详细cmake:如何获得更多诊断?

时间:2017-01-16 12:35:26

标签: build cmake configure infrastructure verbose

我从cmake得到了一些奇怪的错误:

loading initial cache file ../../Tweaks/compiler-rt/arm.txt
-- Performing Test COMPILER_RT_HAS_FPIE_FLAG
CMake Error at CMakeLists.txt:2 (set):
  Syntax error in cmake code at

    D:/Work/AcSo/Views/llvmSecond/build-arm/compiler-rt/CMakeFiles/CMakeTmp/CMakeLists.txt:2

  when parsing string

    D:/Work/AcSo/Views/llvmSecond/llvm/projects/compiler-rt/cmake;D:/Work/AcSo/Views/llvmSecond/llvm/projects/compiler-rt/cmake/Modules;D:/Work/AcSo/Views/llvmSecond/llvm/cmake;D:\Work\AcSo\Views\llvmSecond\build-host\Release\lib\cmake\llvm

  Invalid character escape '\W'.


CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Configuring incomplete, errors occurred!
See also "D:/Work/AcSo/Views/llvmSecond/build-arm/compiler-rt/CMakeFiles/CMakeOutput.log".

我所能理解的是它以某种方式得到一个Windows路径,然后抱怨\W字符序列。实际上我已经做了我能给cmake Linux路径做的事情。所以我不知道Windows路径的来源。 CMakeOutput.log

中的此错误似乎没什么用

我想从cmake获得更多的诊断,即它的作用和原因,但是搜索" cmake verbose"而是给出关于使make详细,而不是cmake本身的结果。

有没有办法强制cmake详细/获取更多诊断/调试或跟踪输出?或者,如果你能说出我在特定情况下的问题,那也是值得赞赏的。

1 个答案:

答案 0 :(得分:7)

在这种特殊情况下,为评论中链接的问题建议的cmake标记--trace--debug-output没有--debug-trycompile标记那样有用,它会将这些文件保存为{{1 (因此,当cmake失败时,它们不会被删除)。