7

我从 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 详细/获取更多诊断/调试或跟踪输出?或者,如果您能说出我的具体情况有什么问题,那也很感激。

4

1 回答 1

6

在这种特殊情况下,cmake 标志--trace--debug-output评论中链接的问题的建议不如--debug-trycompileflag 有用,后者将此类文件保留为CMakeFiles/CMakeTmp/CMakeLists.txt(因此当 cmake 失败时它们不会被删除)。

于 2017-01-17T10:57:56.333 回答