CMake Build System (CMakeLists.txt)
🟡 Intermediate
📖 Definition
CMake is the industry-standard meta-build system for C++ projects. A CMakeLists.txt file specifies target executables, compiler flags, standards requirements, and third-party dependency linking across platform toolchains.
💡 Code Example
cmake_minimum_required(VERSION 3.15)
project(MyCppProject VERSION 1.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_executable(app main.cpp utils.cpp)