我正在尝试使用cmake
,clang
和VS14
与Clang 3.7
构建一个简单的hello-world程序。
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之前都清理了构建目录)
答案 0 :(得分:1)
我在使用CMake,VS15,Clang 3.7构建项目时遇到了同样的问题。
我刚刚为Windows窗体http://llvm.org/builds/创建了一个LLVM快照构建 安装最新版本的clang(在编写v3.9.0时)。
安装后的属性 - &gt;一般 - &gt;平台工具 - &gt; LLVM-vs2014(切换到LLVM-vs2014)和构建。