CMake 2.8.10.2 for Windows 只是拒绝使用 Visual Studio 2012(在 Windows 7 下)为我配置项目
似乎 CMake 添加了一些 Microsoft 编译器不再支持的设置。 链接:致命错误 LNK1117:选项“清单:嵌入”中的语法错误
我尝试使用非常基本的 cmake 文件得到了相同的结果
cmake_minimum_required (VERSION 2.6)
add_executable(test test.cpp)
有解决办法吗?
输出窗口显示:
The C compiler identification is MSVC 17.0.51106.1
The CXX compiler identification is MSVC 17.0.51106.1
Check for working C compiler using: Visual Studio 11
Check for working C compiler using: Visual Studio 11 -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
11.0/VC/bin/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/tmp/testCmake/build/CMakeFiles/CMakeTmp
Run Build Command:C:\PROGRA~2\MICROS~2.0\Common7\IDE\devenv.com
CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec3122367237
Microsoft (R) Microsoft Visual Studio 2012 Version 11.0.51106.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: cmTryCompileExec3122367237, Configuration:
Debug Win32 ------
1> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01
for 80x86
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D
"CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise
/Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec3122367237.dir\Debug\\"
/Fd"C:/tmp/testCmake/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec3122367237.pdb"
/Gd /TC /analyze- /errorReport:prompt /Zm1000 testCCompiler.c
1>
1> testCCompiler.c
1>LINK : fatal error LNK1117: syntax error in option 'manifest:embed'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
==========
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
Configuring incomplete, errors occurred!