summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-10-23 16:37:06 (GMT)
committerCraig Scott <craig.scott@crascit.com>2020-10-26 11:32:45 (GMT)
commitb7d7eca66db97f9dcb6068762733f06941c0c05a (patch)
tree17b111e02de883947dd10c1097ae14303906945b /Source/cmakemain.cxx
parentf2a59d400e9ec2e937f6000000c2e9860e388ca7 (diff)
downloadCMake-b7d7eca66db97f9dcb6068762733f06941c0c05a.zip
CMake-b7d7eca66db97f9dcb6068762733f06941c0c05a.tar.gz
CMake-b7d7eca66db97f9dcb6068762733f06941c0c05a.tar.bz2
CMakePresets.json: Rework how --preset argument is handled
If a path argument with no -S or -B leads to a cache directory, use that directory as the binary directory. Otherwise, use the binary directory from the preset. Fixes: #21311
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index f570337..f0963c2 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -49,8 +49,7 @@ const char* cmDocumentationUsage[][2] = {
{ nullptr,
" cmake [options] <path-to-source>\n"
" cmake [options] <path-to-existing-build>\n"
- " cmake [options] -S <path-to-source> -B <path-to-build>\n"
- " cmake [options] -S <path-to-source> --preset=<preset-name>" },
+ " cmake [options] -S <path-to-source> -B <path-to-build>" },
{ nullptr,
"Specify a source directory to (re-)generate a build system for "
"it in the current working directory. Specify an existing build "