我不明白的 CMake 错误
CMake error that i do not understand
我正在使用 CMake 编译一个项目。这是我的来源的路径: https://github.com/Ro6afF/Snake 。当我输入这个
cd build && cmake ..
它打印这个:
CMake Error: Could not find cmake module file: CMakeDetermineSnakeCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_Snake_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_Snake_COMPILER
CMake Error: Could not find cmake module file: /home/asd/snake/build/CMakeFiles/3.5.0/CMakeSnakeCompiler.cmake
CMake Error at CMakeLists.txt:3 (Project):
No CMAKE_Snake_COMPILER could be found.
Tell CMake where to find the compiler by setting the CMake cache entry
CMAKE_Snake_COMPILER to the full path to the compiler, or to the compiler
name if it is in the PATH.
CMake Error: Could not find cmake module file: CMakeSnakeInformation.cmake
CMake Error: CMAKE_Snake_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/home/asd/snake/build/CMakeFiles/CMakeOutput.log".
你能解释一下如何解决这个错误吗?
提前致谢!
您错误地使用了project命令:
PROJECT(OpenGL Snake)
space 充当分隔符。这意味着项目名称是 OpenGL
,语言是 Snake
。 CMake 不知道这样的语言。
将代码更改为
PROJECT(OpenGL_Snake)
我正在使用 CMake 编译一个项目。这是我的来源的路径: https://github.com/Ro6afF/Snake 。当我输入这个
cd build && cmake ..
它打印这个:
CMake Error: Could not find cmake module file: CMakeDetermineSnakeCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_Snake_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_Snake_COMPILER
CMake Error: Could not find cmake module file: /home/asd/snake/build/CMakeFiles/3.5.0/CMakeSnakeCompiler.cmake
CMake Error at CMakeLists.txt:3 (Project):
No CMAKE_Snake_COMPILER could be found.
Tell CMake where to find the compiler by setting the CMake cache entry
CMAKE_Snake_COMPILER to the full path to the compiler, or to the compiler
name if it is in the PATH.
CMake Error: Could not find cmake module file: CMakeSnakeInformation.cmake
CMake Error: CMAKE_Snake_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/home/asd/snake/build/CMakeFiles/CMakeOutput.log".
你能解释一下如何解决这个错误吗? 提前致谢!
您错误地使用了project命令:
PROJECT(OpenGL Snake)
space 充当分隔符。这意味着项目名称是 OpenGL
,语言是 Snake
。 CMake 不知道这样的语言。
将代码更改为
PROJECT(OpenGL_Snake)