summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-01-09 14:37:17 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-01-09 14:37:17 (GMT)
commit69c366a28178027a5cf2629c0240d1709ae9ab55 (patch)
treefe61369dffe946ccb6b17830994d901e3af4662c /Source/cmGlobalGenerator.cxx
parentf3a9eb45605638b42ca431731080875470cc229a (diff)
parentbe0458c5620d611a772fd3a25312cf5ae6cb492c (diff)
downloadCMake-69c366a28178027a5cf2629c0240d1709ae9ab55.zip
CMake-69c366a28178027a5cf2629c0240d1709ae9ab55.tar.gz
CMake-69c366a28178027a5cf2629c0240d1709ae9ab55.tar.bz2
Merge topic 'optional-install'
be0458c InstallRules: added new variable to disable generation of install rules
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 82c9155..b8c494f 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1183,7 +1183,11 @@ void cmGlobalGenerator::Generate()
this->LocalGenerators[i]->GetMakefile()->SetGeneratingBuildSystem();
this->SetCurrentLocalGenerator(this->LocalGenerators[i]);
this->LocalGenerators[i]->Generate();
- this->LocalGenerators[i]->GenerateInstallRules();
+ if(!this->LocalGenerators[i]->GetMakefile()->IsOn(
+ "CMAKE_SKIP_INSTALL_RULES"))
+ {
+ this->LocalGenerators[i]->GenerateInstallRules();
+ }
this->LocalGenerators[i]->GenerateTestFiles();
this->CMakeInstance->UpdateProgress("Generating",
(static_cast<float>(i)+1.0f)/
@@ -2271,7 +2275,14 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
}
//Install
- if(this->InstallTargetEnabled)
+ bool skipInstallRules = mf->IsOn("CMAKE_SKIP_INSTALL_RULES");
+ if(this->InstallTargetEnabled && skipInstallRules)
+ {
+ mf->IssueMessage(cmake::WARNING,
+ "CMAKE_SKIP_INSTALL_RULES was enabled even though "
+ "installation rules have been specified");
+ }
+ else if(this->InstallTargetEnabled && !skipInstallRules)
{
if(!cmakeCfgIntDir || !*cmakeCfgIntDir || cmakeCfgIntDir[0] == '.')
{