I searched a long time for a way of changing CMake's build directory without cd
ing into it.
I eventually find the -H
option and make my scripts with it.
Now I typed in cmake --help
and I directly have seen following output:
$ cmake --help
Usage
cmake [options] <path-to-source>
cmake [options] <path-to-existing-build>
cmake [options] -S <path-to-source> -B <path-to-build>
I recently use:
$ cmake --version
cmake version 3.14.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).
and I think in older version this was missing.
Nevertheless, I wonder if there is any difference between -H
and -S
option. Furthermore I wonder if they are safe to use at all. I found this questions in other posts, but it has not been answered (e.g. here: How to tell CMake where to put build files?)