Извиквам cmake -G "NMake Makefiles" от командния ред на Microsoft Visual C++ 2010 x64. Идентификацията на компилатора C е правилна, но идентификацията на компилатора CXX не е.
Наистина съм объркан, защото е работил и преди, но не можах да определя какво се промени (актуализация на Windows?) и повдигна този проблем. Така че търся корена на този проблем.
Как CMake намира компилатора cxx (под Windows: cl.exe
) и може би как да променя това поведение? (Настройката на CMAKE_CXX_COMPILER изглежда няма ефект.)
Ето странния изход на CMake:
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 -- works
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 -- broken
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 не е инсталиран на тази машина (Откъде, за бога, идва пътят C:/Program Files (x86)/Microsoft Visual Studio 9.0
? Той не излиза на тази машина и не съм го въвел никъде в CMake.)
CMake (изход по-горе) беше извикан от командния ред на Visual Studio. Това обаждане възпроизвежда този проблем:
call "%VS100COMNTOOLS%"\..\..\VC\bin\amd64\vcvars64.bat
cmake -G "NMake Makefiles" C:\base_repos\free
Visual Studio 2010 Ultimate (инсталиран SP1)