cmake not picking up right cl.exe version for generator Visual Studio 14 2015 Win64
Hi,
cmake's try-compile fails with the error:
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified.
This is my setup:
- I have Visual Studio Enterprise 2015 update 2 installed
- from a developer command prompt cl.exe is available: where cl.exe returns: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe
When I run cmake from this same developer's command prompt on a trivial CMakeLists.txt file, cmake outputs:
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
Note that it is not picking up amd64/cl.exe as it should according to the output of the where command above, but x86_amd64/cl.exe
After some compilation cmake than fails with the message:
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified.
If I run cmake like this cmake .. -G "Visual Studio 14", it runs without problems but in this case it tried to compile for the x86 platform (of course).
Anyone who knows what is going wrong here?
Any help is appreciated.