【发布时间】:2016-07-29 11:45:54
【问题描述】:
我正在尝试使用 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 中使用什么构建系统?忍者?还是 Makefile?
-
我已经下载了忍者来制作文件。
-
如何设置使用哪个构建系统?我也有 makefile,可以使用其中任何一个
-
将您使用的命令行添加到问题中。如果在命令行上运行
ninja会发生什么? -
我得到这个错误:ninja: command not found