CmakeLists.txt

  1. how to prepare compilation and build
  2. CMake project
  3. Makefile project

Normally we have two methods to compile and build the C/CPP projects: makefile and cmakelist.

Haven’t researched this yet. But I know how to run a project by CmakeLists.txt. Please refer to Clion Debug Trick.

how to prepare compilation and build

sudo apt update

CMake project

CMakeLists.txt文件通常要求cmake命令

sudo apt install cmake 
cmake –version
cmake

现在通常在Makefile文件中可以看到cmake命令。cmake会执行CMakeLists.txt中的指令,生成Makefile文件。

Makefile project

make

Welcome to point out the mistakes and faults!