diff options
author | Brad King <brad.king@kitware.com> | 2014-01-09 14:37:17 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-01-09 14:37:17 (GMT) |
commit | 69c366a28178027a5cf2629c0240d1709ae9ab55 (patch) | |
tree | fe61369dffe946ccb6b17830994d901e3af4662c /Source/cmGlobalGenerator.cxx | |
parent | f3a9eb45605638b42ca431731080875470cc229a (diff) | |
parent | be0458c5620d611a772fd3a25312cf5ae6cb492c (diff) | |
download | CMake-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.cxx | 15 |
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] == '.') { |