2012-10-27 31 views
3

我曾經使用KDevelop的Linux Mint的這工作得很好。現在我重新安裝了Linux,我無法讓Kdevelop和cmake工作。缺少可變cmake_3_compiler 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) 
+0

你能從'練習3'目錄顯示'CMakeLists.txt'? – arrowd

回答

2

看看project() command documentation

它的第一個參數是項目的名稱和其他人使用的語言。 CMake認爲3是一種編程語言,並試圖找到它的編譯器。

無論是從項目的名稱或使用引號中的空格:project("exercise 3")

+0

工作很酷謝謝! – benehsv