setup on Ubuntu - RawIron/learn-cpp GitHub Wiki
Install packages
apt install build-essential
apt install clang-tools-9
apt install cmake
apt install libboost-all-dev
Setup cmake
Copy a CMakeLists.txt into your project root
cp ./cmake/CMakeLists.txt <your project root>
Edit the CMakeLists.txt file
- change the project name
project("cppskills")
- add a build target
add_executable(pointer intro_pointer.cpp)
Recommended compiler flags
-Wall -Weffc++ -Wextra -Wsign-conversion -Werror
create a build directory
mkdir <your project root>/build
Test the setup
cd <your project root>
cd build
cmake ..
make <build target>