diff options
author | Brad King <brad.king@kitware.com> | 2013-08-27 18:15:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-08-28 12:57:12 (GMT) |
commit | e478f0346934d3f1e44f62d87861ec5288e703b7 (patch) | |
tree | 94614a497d5a820b78e13f44b7ac97dcbb94e524 /Source/cmGlobalVisualStudio8Generator.cxx | |
parent | b15ad0d1de7524be3b32d6691b68d3578ee00ca5 (diff) | |
download | CMake-e478f0346934d3f1e44f62d87861ec5288e703b7.zip CMake-e478f0346934d3f1e44f62d87861ec5288e703b7.tar.gz CMake-e478f0346934d3f1e44f62d87861ec5288e703b7.tar.bz2 |
VS: Fix CMAKE_SUPPRESS_REGENERATION bad ZERO_CHECK dependency (#14378)
When CMAKE_SUPPRESS_REGENERATION tells us not to create the ZERO_CHECK
target we should not add dependencies on it from other targets either.
Reviewed-by: Mateusz Loskot <mateusz@loskot.net>
Diffstat (limited to 'Source/cmGlobalVisualStudio8Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.cxx | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index e4244e0..1a4c7ff 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -202,7 +202,7 @@ std::string cmGlobalVisualStudio8Generator::GetUserMacrosRegKeyBase() } //---------------------------------------------------------------------------- -void cmGlobalVisualStudio8Generator::AddCheckTarget() +bool cmGlobalVisualStudio8Generator::AddCheckTarget() { // Add a special target on which all other targets depend that // checks the build system and optionally re-runs CMake. @@ -216,7 +216,7 @@ void cmGlobalVisualStudio8Generator::AddCheckTarget() // Skip the target if no regeneration is to be done. if(mf->IsOn("CMAKE_SUPPRESS_REGENERATION")) { - return; + return false; } std::string cmake_command = mf->GetRequiredDefinition("CMAKE_COMMAND"); @@ -315,21 +315,24 @@ void cmGlobalVisualStudio8Generator::AddCheckTarget() cmSystemTools::Error("Error adding rule for ", stamps[0].c_str()); } } + + return true; } //---------------------------------------------------------------------------- void cmGlobalVisualStudio8Generator::Generate() { - this->AddCheckTarget(); - - // All targets depend on the build-system check target. - for(std::map<cmStdString,cmTarget *>::const_iterator - ti = this->TotalTargets.begin(); - ti != this->TotalTargets.end(); ++ti) + if(this->AddCheckTarget()) { - if(ti->first != CMAKE_CHECK_BUILD_SYSTEM_TARGET) + // All targets depend on the build-system check target. + for(std::map<cmStdString,cmTarget *>::const_iterator + ti = this->TotalTargets.begin(); + ti != this->TotalTargets.end(); ++ti) { - ti->second->AddUtility(CMAKE_CHECK_BUILD_SYSTEM_TARGET); + if(ti->first != CMAKE_CHECK_BUILD_SYSTEM_TARGET) + { + ti->second->AddUtility(CMAKE_CHECK_BUILD_SYSTEM_TARGET); + } } } |