In CMakeCache.txt, for a Visual Studio based build where C and/or C++ has been enabled:

//CXX compiler
CMAKE_CXX_COMPILER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/cl.exe

//C compiler
CMAKE_C_COMPILER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/cl.exe

Those are as rock solid a basis as you'll get for a "typical" visual studio build. I think it would be wiser to depend on those than on the CMAKE_LINKER variable.

Microsoft has a habit of assuming things like this are internal implementation details, though, and they often move things around from version to version.

So nothing is guaranteed.

But I would think the compiler variables would be better suited if you don't want to rely on ENV or registry... I would point out however, that you don't need to rely on any cmake vars or any cmake commands having been run if you go with ENV or registry.


HTH,
David C.

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to