Has been replaced in 3.13 with the official source directory flag of -S.
-H<path-to-source-tree> to set directory with
This internal option is not documented but
widely used by community.
There must be no spaces between
(otherwise option will be interpreted as synonym to
--help). Always must
be used with -B option. Example:
cmake -H. -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.
PowerShell will modify arguments and put the space between
You can protect argument by quoting it:
cmake '-H.' -B_builds
CMake mailing list