[CMake] Visual Studio 12 C++ Compiler Detection
Jakub Zakrzewski
jzakrzewski at e2e.ch
Fri Dec 5 03:58:28 EST 2014
> So, it appears to find the compiler OK since it emits the correct compiler identification. But, the actual value of CMAKE_CXX_COMPILER is not usable. If you try to execute
> C:/Program…./x86_amd64/cl.exe from within a CMake script or even from the command line, it will fail and produce the well-known “0xc000007b” dialog (missing DLL). Unless you’ve sourced > vcvarsx86_amd64.bat, the correct environment variables are not set for this version of the compiler.
> On the other hand, if I do “cmake –G NMake Makefiles”, I get what I expect:
> Namely, it finds C:/Program…./amd64/cl.exe.
> I would like to see how it is coming up with this version of the compiler which isn’t even in the PATH.
Hi Allen,
CMake does not pay attention to the PATH when you ask for VisualStudio generator. It simply finds it using it's internal logic. The generated projects are suitable for opening in the IDE.
The NMake generator behaves much more like Unix Makefiles generator, so it is sensitive to the environment variables and remembers all variables it needs.
--
Gruesse,
Jakub
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20141205/852362e9/attachment.html>
More information about the CMake
mailing list