[CMake] How does cmake find its compiler?

Daniel Russel drussel at gmail.com
Mon Mar 4 12:41:46 EST 2013


I'm not very clear on how cmake chooses which compiler it uses by default. Specifically, we have a system where a there is an old version of gcc installed in the system and then a newer version installed elsewhere, but in the PATH (so running g++ or gcc finds the new version). However, cmake uses the old version unless we explicitly set the CMAKE_CXX_COMPILER. Is this what is supposed to happen? I couldn't find docs on how the default compiler is picked. Thanks.


More information about the CMake mailing list