diff options
author | Brad King <brad.king@kitware.com> | 2021-02-23 08:50:40 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-02-23 09:11:44 -0500 |
commit | 3357d377612fc238ff9da61666041764792034bb (patch) | |
tree | 36d7e26521e0a613f2f5ee74d0b3c798a23ee01f /Source/cmakemain.cxx | |
parent | 2f13fdef0a9471165751f628cb4b2ba7b83b1ae1 (diff) | |
download | cmake-3357d377612fc238ff9da61666041764792034bb.tar.gz |
cmake: Add support for '--build --prefix=<prefix>' form of the argument
The main `cmake --preset` argument for configure presets supports both
forms, so support it for `cmake --build --preset` too.
Issue: #21855
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r-- | Source/cmakemain.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 4260ca2d90..88ba0116ca 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -511,6 +511,7 @@ int do_build(int ac, char const* const* av) bool hasPreset = false; for (int i = 2; i < ac; ++i) { if (strcmp(av[i], "--list-presets") == 0 || + cmHasLiteralPrefix(av[i], "--preset=") || strcmp(av[i], "--preset") == 0) { hasPreset = true; break; @@ -584,7 +585,7 @@ int do_build(int ac, char const* const* av) "Usage: cmake --build [<dir> | --preset <preset>] [options] [-- [native-options]]\n" "Options:\n" " <dir> = Project binary directory to be built.\n" - " --preset <preset>\n" + " --preset <preset>, --preset=<preset>\n" " = Specify a build preset.\n" " --list-presets\n" " = List available build presets.\n" |