如何解决使用 cmake 构建忍者时遇到问题
我在使用 cmake 构建 ninja 时遇到问题。我有我的 CC 和 CXX 环境变量(cmake 用于 c、cxx 的编译器),设置为 clang
。当我运行 cmake -Bbuild-cmake -H.
时,它会产生以下错误:
C:\Program Files\ninja>cmake -Bbuild-cmake -H.
-- Building for: NMake Makefiles
-- The C compiler identification is Clang 11.0.0 with GNU-like command-line
-- The CXX compiler identification is Clang 11.0.0 with GNU-like command-line
-- Detecting C compiler ABI info
CMake Error: Generator: execution of make failed. Make command was: nmake -f Makefile /nologo cmTC_82237\fast &&
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Program Files/LLVM/bin/clang.exe
CMake Error: Generator: execution of make failed. Make command was: nmake -f Makefile /nologo cmTC_49bcb\fast &&
-- Check for working C compiler: C:/Program Files/LLVM/bin/clang.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"C:/Program Files/LLVM/bin/clang.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Program Files/ninja/build-cmake/CMakeFiles/CMakeTmp
Run Build Command(s):nmake -f Makefile /nologo cmTC_49bcb\fast && The system cannot find the file specified
Generator: execution of make failed. Make command was: nmake -f Makefile /nologo cmTC_49bcb\fast &&
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:6 (project)
-- Configuring incomplete,errors occurred!
See also "C:/Program Files/ninja/build-cmake/CMakeFiles/CMakeOutput.log".
See also "C:/Program Files/ninja/build-cmake/CMakeFiles/CMakeError.log".
我很困惑,非常欢迎任何帮助
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。