gpt4 book ai didi

cmake - CMake 未找到 Ninja

转载 作者:行者123 更新时间:2023-12-02 15:17:57 25 4
gpt4 key购买 nike

我正在尝试使用 CMake 构建从 GitHub 获得的一些代码,但不断收到以下错误:

CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:/golang/project/src/github.com/devsisters/goquic/libquic/build/debug/CMakeFiles/2.8.11/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:/golang/project/src/github.com/devsisters/goquic/libquic/build/debug/CMakeFiles/2.8.11/CMakeCXXCompiler.cmake
-- Configuring incomplete, errors occurred!

如何正确设置这些变量?

我使用 GitHub 代码附带的 ./build_libs.sh 文件来构建它。

最佳答案

您正在执行的脚本使用 CMake Ninja 生成器。为了实现这一点,你需要忍者在路上。在大多数 Linux 发行版上,您可以从包中安装它。

Ubuntu:忍者构建

openSUSE :忍者

如果您找不到适合您的发行版的它,则必须下载它并将其位置添加到 path 环境变量中。

关于cmake - CMake 未找到 Ninja,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38658014/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com