diff options
author | Brad King <brad.king@kitware.com> | 2012-07-11 19:03:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-07-11 19:10:40 (GMT) |
commit | 8720aa0496bad1381a6636a3c4a6d5d550381960 (patch) | |
tree | 68ffe5cf57608b695ca5e1c10b33ad4f65afa60e /Source/cmInstallCommandArguments.cxx | |
parent | b71e731b9b91f9f79ab49838baae5bb5ab42c30e (diff) | |
download | CMake-8720aa0496bad1381a6636a3c4a6d5d550381960.zip CMake-8720aa0496bad1381a6636a3c4a6d5d550381960.tar.gz CMake-8720aa0496bad1381a6636a3c4a6d5d550381960.tar.bz2 |
install: Fix COMPONENT option
Since commit 7ced0732 (make default install component name configurable,
2012-05-13) the COMPONENT option has not worked in all cases. The
change restored use of the broken SetDefaultString previously removed by
commit 43cad3e4 (fix the default "Unspecified" component, 2008-03-26).
Remove SetDefaultString and use the default component name only when an
invocation does not specify a non-empty COMPONENT option value.
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680825
Diffstat (limited to 'Source/cmInstallCommandArguments.cxx')
-rw-r--r-- | Source/cmInstallCommandArguments.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx index 0ba21c7..8e48f08 100644 --- a/Source/cmInstallCommandArguments.cxx +++ b/Source/cmInstallCommandArguments.cxx @@ -36,8 +36,8 @@ cmInstallCommandArguments::cmInstallCommandArguments( ,NamelinkOnly (&Parser, "NAMELINK_ONLY" , &ArgumentGroup) ,NamelinkSkip (&Parser, "NAMELINK_SKIP" , &ArgumentGroup) ,GenericArguments(0) +,DefaultComponentName(defaultComponent) { - this->Component.SetDefaultString(defaultComponent.c_str()); } const std::string& cmInstallCommandArguments::GetDestination() const @@ -63,7 +63,10 @@ const std::string& cmInstallCommandArguments::GetComponent() const { return this->GenericArguments->GetComponent(); } - + if (!this->DefaultComponentName.empty()) + { + return this->DefaultComponentName; + } static std::string unspecifiedComponent = "Unspecified"; return unspecifiedComponent; } |