official site
Introduction
CMake Tutorial
Demo Project
C实现简单工厂模式
Since CMake version
3.13
, there is a-B
option that automatically creates the build directory
The-S
option specifies the source directory (where to search for aCMakeLists.txt
file) and avoids the need ofcd
'ing into the source tree before executingcmake
Combined together, these two options are a convenient way to specify the build and the source directories