CMake错误:无法创建命名生成器CodeLite - Unix Makefiles

问题描述 投票:1回答:1

使用Ubuntu LTS 14.04。尝试在本教程TheChernoProject How to Setup C++ on Linux之后设置codelite以在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.是:

#!/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工作空间

c++ makefile cmake codelite
1个回答
1
投票

我从头开始创建一个纯粹使用CodeLite的新项目,它为我生成了CMake文件。一切都完美无瑕。

© www.soinside.com 2019 - 2024. All rights reserved.