CMake is a cross-platform build system generator, while Make is a build automation tool. They are often used together to create build systems for C/C++ projects.

CMake generates platform-specific build files (such as Makefiles on Unix-like systems or Visual Studio project files on Windows) based on a high-level CMakeLists.txt configuration file. This allows developers to write build scripts once and then generate build files for multiple platforms and build systems.

Make, on the other hand, is a tool that reads a Makefile and executes commands to build a project. It is commonly used on Unix-like systems to automate the compilation and linking process. Make reads the dependencies specified in the Makefile and determines which files need to be recompiled based on their modification timestamps.

GCC (GNU Compiler Collection) is a collection of compilers for various programming languages, including C and C++. It is often used as the underlying compiler in the build process. Make can invoke GCC to compile and link the source code files specified in the Makefile.

In summary, CMake is used to generate platform-specific build files, Make is used to execute the build process based on a Makefile, and GCC is the compiler invoked by Make to compile and link the source code.

cmake make gcc关系

原文地址: https://www.cveoy.top/t/topic/i5Yr 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录