Skip to content

Make Series

Overview

For C and C++ programming, when the amount of engineering work gradually increases and the amount of code gradually increases, we need an automated compilation tool to help us manage the code. Make is a very popular automated compilation tool, which can help us automate the compilation of code, manage the dependency relationship of code, and automate the execution of tests. The file corresponding to Make is Makefile, which is a text file containing a series of rules for specifying how to compile and link code.

When the amount of code increases further and cross-platform is needed, we may need to use more advanced automated compilation tools, such as CMake. CMake is a cross-platform automated compilation tool that can help us generate compilation projects under different platforms. The file corresponding to CMake is CMakeLists.txt, which is a text file containing a series of rules for specifying how to compile and link code.

A simple understanding of the relationship between cmake and make is that cmake generates Makefile based on CMakeLists.txt, and then uses make to compile the code.

Reference Articles:

  • 5分钟理解make/makefile/cmake/nmake🎯✅


    Understanding CMake/Makefile/Make/NMake (In Chinese)

    Portal

GNU Make

CMake