Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是否更改由KDevelop创建的默认CMakeLists.txt?_Cmake_Kdevelop - Fatal编程技术网

是否更改由KDevelop创建的默认CMakeLists.txt?

是否更改由KDevelop创建的默认CMakeLists.txt?,cmake,kdevelop,Cmake,Kdevelop,创建项目时,我的CMakeLists.txt文件如下所示: cmake_minimum_required(VERSION 2.6) project(testttt) add_executable(testttt main.cpp) install(TARGETS testttt RUNTIME DESTINATION bin) cmake_minimum_required(VERSION 2.6) project(testttt) add_executable(testttt main.

创建项目时,我的
CMakeLists.txt
文件如下所示:

cmake_minimum_required(VERSION 2.6)
project(testttt)

add_executable(testttt main.cpp)

install(TARGETS testttt RUNTIME DESTINATION bin)
cmake_minimum_required(VERSION 2.6)
project(testttt)

add_executable(testttt main.cpp)

install(TARGETS testttt RUNTIME DESTINATION bin)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
但我希望它看起来像这样:

cmake_minimum_required(VERSION 2.6)
project(testttt)

add_executable(testttt main.cpp)

install(TARGETS testttt RUNTIME DESTINATION bin)
cmake_minimum_required(VERSION 2.6)
project(testttt)

add_executable(testttt main.cpp)

install(TARGETS testttt RUNTIME DESTINATION bin)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

因此,默认情况下我支持C++11。如何实现?

KDevelop项目模板使用Grantle模板引擎实现。如何添加自己的模板的手册

内置模板位于>/Stuts/Apps/KDVEFLIETEMPLATE/TABLE < /C>中,可以使用“Basic C++项目”作为例子。