diff options
author | Craig Scott <craig.scott@crascit.com> | 2024-12-11 09:21:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-12-11 14:58:39 (GMT) |
commit | 92e63421cbd423bb5ffcb849fe3a347a6cb07e39 (patch) | |
tree | 22790df98b1e08a38427bc2855b0bb7fa724745d /Source | |
parent | 793c5f11f6863284ec1561970bee816037e40b91 (diff) | |
download | CMake-92e63421cbd423bb5ffcb849fe3a347a6cb07e39.zip CMake-92e63421cbd423bb5ffcb849fe3a347a6cb07e39.tar.gz CMake-92e63421cbd423bb5ffcb849fe3a347a6cb07e39.tar.bz2 |
install: Restore treatment of DESTINATION as a single-valued keyword
The `install(RUNTIME_DEPENDENCY_SET)` form processes its arguments in a
slightly different way to other forms of the command. It handles the
`POST_...`, `PRE_...` and `DIRECTORIES` keywords separately. These
keywords are not visible to the first layer of keyword processing, so
they don't terminate multi-value keyword value parsing.
Before commit 6a1fac1450 (install: Normalize DESTINATION paths,
2024-09-18, v3.31.0-rc1~73^2), the `DESTINATION` keyword was handled as
a simple string value. That commit changed it to use a function so it
could process the value before storing it, but the function returned the
wrong value. This meant it was treated as a multi-value keyword instead
of a single-value keyword.
Fixes: #26512
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmInstallCommandArguments.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx index f371cff..8e12cfe 100644 --- a/Source/cmInstallCommandArguments.cxx +++ b/Source/cmInstallCommandArguments.cxx @@ -37,7 +37,7 @@ cmInstallCommandArguments::cmInstallCommandArguments( case cmPolicies::OLD: normalizeDest = [this](cm::string_view arg) -> ArgumentParser::Continue { this->Destination = std::string(arg.begin(), arg.end()); - return ArgumentParser::Continue::Yes; + return ArgumentParser::Continue::No; }; break; case cmPolicies::WARN: @@ -52,7 +52,7 @@ cmInstallCommandArguments::cmInstallCommandArguments( MessageType::AUTHOR_WARNING, cmPolicies::GetPolicyWarning(cmPolicies::CMP0177)); } - return ArgumentParser::Continue::Yes; + return ArgumentParser::Continue::No; }; break; case cmPolicies::NEW: @@ -63,7 +63,7 @@ cmInstallCommandArguments::cmInstallCommandArguments( this->Destination = cmStrCat("$<PATH:CMAKE_PATH,NORMALIZE,", arg, '>'); } - return ArgumentParser::Continue::Yes; + return ArgumentParser::Continue::No; }; break; case cmPolicies::REQUIRED_ALWAYS: |