4

Using Ubuntu LTS 14.04. Trying to set up codelite to develop in c++ following this tutorial TheChernoProject How to Setup C++ on Linux

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

EDIT: After consulting the Documentation https://github.com/eranif/codelite I modified build.sh to:

cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug

and it worked. and gave the output:

-- 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

However the HelloWorld workspace was not generated

Ahmed
  • 55
  • 2
  • 7

1 Answers1

2

I created a fresh project from scratch purely using CodeLite and it generated the CMake file for me. Everything worked flawlessly.

ES3178
  • 756
  • 5
  • 5
  • For some reason, codelite crashes every time I try to create a new project – Ahmed Dec 28 '17 at 09:52
  • 1
    Ah! I found this for you: https://stackoverflow.com/questions/26603375/codelite-crashes-after-clicking-new-workspace-or-creating-new-project-in-ubuntu – ES3178 Dec 29 '17 at 02:49
  • This was exactly what I needed.After creating a workspace, and making a new project, everything builds and runs as expected. – Ahmed Dec 29 '17 at 16:59