Different make tools follow different specifications and standards, so different Makefiles are required for different standards. CMake uses a platform-independent CMakeList.txt file to customize the compilation process, and generates localized Makefiles and project files according to the target user's platform.
Process under Linux:
- Write the CMake configuration file CMakeLists.txt.
- Execute the command cmake Path to generate the Makefile. where PATH is the directory where CMakeLists.txt is located.
- Compile using the make command.