-S <path-to-source-tree> to set directory with
This option was added in CMake 3.13 and replaces the the undocumented and internal variable
-H. This option can be used independently of
cmake -S . -B _builds
Use current directory as a source tree (i.e. start with
./CMakeLists.txt) and put generated files to the
Path to this directory will be saved in CMAKE_SOURCE_DIR variable.