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之前構建目錄)