CMake 错误:无法创建命名生成器 CodeLite - Unix 生成文件
CMake Error: Could not create named generator CodeLite - Unix Makefiles
Using Ubuntu LTS 14.04.尝试设置codelite以在c ++中开发本教程TheChernoProject 如何在Linux上设置C++
CMakeLists.txt:
cmake_minimum_required (VERSION 3.5)
project (HelloWorld)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++14")
set (source_dir "${PROJECT_SOURCE_DIR}/src/")
file (GLOB source_files "${source_dir}/*.cpp")
add_executable (HelloWorld ${source_files})
build.sh:
#!/bin/sh
cmake -G "CodeLite - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug
编辑:在查阅文档 https://github.com/eranif/codelite 后,我 build.sh 修改为:
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug
它奏效了。 并给出了输出:
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
但是,未生成"HelloWorld"工作区
我纯粹使用 CodeLite 从头开始创建了一个新项目,它为我生成了 CMake 文件。一切都完美无缺。
相关文章:
- .cpp和.h文件中的模板专用化声明
- 为什么两个不同的未命名名称空间可以共存于一个cpp文件中
- 文本文件中的单词链表
- CMake-按正确顺序将项目与C运行时对象文件链接
- 使用新行和不使用新行读取文件
- 在C++程序中输入的文本文件将不起作用,除非文本被复制和粘贴
- 挂起和取消挂起一个文件DLL
- 如何确定我已使用非编码文件到达 EOF?
- 命名空间中具有.h和.cpp文件的类
- 如何使用ndk-build.cmd构建Android.so文件
- 从包含m行的文件中提取n行,必要时(惰性地)重复该文件
- 读取文件并输入到矢量中
- 在C++中查找文件
- c++库的公共头文件中应该包含什么
- 用c++从输入文件中读取另一行
- Cppcheck生成xml转储文件
- CMake 错误:无法创建命名生成器 CodeLite - Unix 生成文件
- 模板文件在CodeLite中无法正常工作
- Codelite 问题 - 未指定可执行文件,使用"目标可执行文件"
- 在Codelite(c++)上构建项目会重新编译太多文件