summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmInstallGenerator.cxx')
-rw-r--r--Source/cmInstallGenerator.cxx18
1 files changed, 12 insertions, 6 deletions
diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx
index 2e1c5f0..660e44f 100644
--- a/Source/cmInstallGenerator.cxx
+++ b/Source/cmInstallGenerator.cxx
@@ -19,11 +19,13 @@ cmInstallGenerator
::cmInstallGenerator(const char* destination,
std::vector<std::string> const& configurations,
const char* component,
- MessageLevel message):
+ MessageLevel message,
+ bool exclude_from_all):
cmScriptGenerator("CMAKE_INSTALL_CONFIG_NAME", configurations),
Destination(destination? destination:""),
Component(component? component:""),
- Message(message)
+ Message(message),
+ ExcludeFromAll(exclude_from_all)
{
}
@@ -146,12 +148,16 @@ void cmInstallGenerator
//----------------------------------------------------------------------------
std::string
-cmInstallGenerator::CreateComponentTest(const char* component)
+cmInstallGenerator::CreateComponentTest(const char* component,
+ bool exclude_from_all)
{
- std::string result = "NOT CMAKE_INSTALL_COMPONENT OR "
- "\"${CMAKE_INSTALL_COMPONENT}\" STREQUAL \"";
+ std::string result = "\"${CMAKE_INSTALL_COMPONENT}\" STREQUAL \"";
result += component;
result += "\"";
+ if(!exclude_from_all)
+ {
+ result += " OR NOT CMAKE_INSTALL_COMPONENT";
+ }
return result;
}
@@ -163,7 +169,7 @@ void cmInstallGenerator::GenerateScript(std::ostream& os)
// Begin this block of installation.
std::string component_test =
- this->CreateComponentTest(this->Component.c_str());
+ this->CreateComponentTest(this->Component.c_str(),this->ExcludeFromAll);
os << indent << "if(" << component_test << ")\n";
// Generate the script possibly with per-configuration code.