summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2013-12-25 16:59:24 (GMT)
committerNils Gladitz <nilsgladitz@gmail.com>2014-01-08 15:28:14 (GMT)
commitbe0458c5620d611a772fd3a25312cf5ae6cb492c (patch)
treea026c5ba04bd2404ce29ae77b22485a865f92bd2 /Source
parentb87ce492ab4600091262593499095ea5db1ae0ca (diff)
downloadCMake-be0458c5620d611a772fd3a25312cf5ae6cb492c.zip
CMake-be0458c5620d611a772fd3a25312cf5ae6cb492c.tar.gz
CMake-be0458c5620d611a772fd3a25312cf5ae6cb492c.tar.bz2
InstallRules: added new variable to disable generation of install rules
The boolean variable CMAKE_SKIP_INSTALL_RULES allows disabling generation of install rules for projects which don't want them.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalGenerator.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 227a948..2dcb5bc 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1172,7 +1172,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)/
@@ -2240,7 +2244,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] == '.')
{