I call cmake -G "Makeake NMake Files" from the Microsoft Visual C ++ 2010 x64 command line. The C compiler identifier is correct, but the CXX compiler identifier is not.
I was really confused because it worked before, but I could not determine what had changed (Windows update?) And raised this issue. Therefore, I am looking for a root for this problem.
How does CMake find the cxx compiler (on Windows:) cl.exeand maybe how can I change this behavior? (Setting CMAKE_CXX_COMPILER does not seem to have any effect.)
Here is the weird CMake output:
The C compiler identification is MSVC 16.0.40219.1
The CXX compiler identification is unknown
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC /bin/amd64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/amd64/cl.exe
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/x86_amd64/cl.exe
CMake Error: your CXX compiler: "C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/x86_amd64/cl.exe" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/x86_amd64/cl.exe
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:54 (message):
The C++ compiler "C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/x86_amd64/cl.exe" is not able to compile a simple test program.
Visual Studio 9 is not installed on this computer (where is the path C: /Program Files (x86)/Microsoft Visual Studio 9.0where it comes from? It does not exit on this computer, and I haven’t printed it in CMake anywhere.)
CMake ( ) Visual Studio. :
call "%VS100COMNTOOLS%"\..\..\VC\bin\amd64\vcvars64.bat
cmake -G "NMake Makefiles" C:\base_repos\free
Visual Studio 2010 Ultimate ( 1)