1
我正在尝试使用cmake
,clang
和VS14
和Clang 3.7
来构建一个简单的hello-world程序。C++:使用Clang和VS14设置DebugInformationFormat
cmake ../src -G "Visual Studio 14 2015" -T "v140_clang_3_7"
我CMakeLists.txt
如下所示:
cmake_minimum_required(VERSION 2.8.9)
project (test)
add_executable(test testfile.cpp)
我得到DebugInformationFormat其值不正确的错误:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Clang
.targets(206,5): error : Element <DebugInformationFormat> has an value of
"ProgramDatabase". [...\build\CMakeFiles\CMakeTmp\cmTC_c45da.vcxproj]
我做了一些研究,并试图覆盖缺省值我的CMakeLists.txt
没有成功
set (CMAKE_CXX_FLAGS "-g2 -gdwarf-2")
无论我试过到目前为止,没有工作了(当然我每天打扫一次新的CMake之前构建目录)