【发布时间】:2012-10-27 13:53:56
【问题描述】:
我曾经在 Linux Mint 上使用 Kdevelop,效果很好。现在我重新安装了 Linux,我无法让 Kdevelop 和 cmake 工作。
编译时出现此错误:
make: *** No targets specified and no makefile found. Stop.
当我尝试配置 cmake 时,我得到:
/home/benedikt/projects/Exercise 3/build> /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug /home/benedikt/projects/Exercise 3/
-- Configuring incomplete, errors occurred!
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_3_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_3_COMPILER
CMake Error: Could not find cmake module file:/home/benedikt/projects/Exercise 3/build/CMakeFiles/CMake3Compiler.cmake
CMake Error: Could not find cmake module file:CMake3Information.cmake
CMake Error: CMAKE_3_COMPILER not set, after EnableLanguage
我必须将变量设置为什么,在哪里设置?
编辑: CMakeList.txt 是:
project(exercise 3)
add_executable(exercise 3 main.cpp)
【问题讨论】:
-
你能从
Exercise 3目录显示CMakeLists.txt吗?
标签: compiler-construction cmake kdevelop