summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-07 19:41:44 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-10-07 19:41:44 (GMT)
commita65df441f2f1acefd1900382b09c410f9c15f4b2 (patch)
tree094e6573ad3272c1e804d9e5c1951b851c68f854
parent058af7a6ce3f9df093fae3d68484c1305c6c985a (diff)
parente478f0346934d3f1e44f62d87861ec5288e703b7 (diff)
downloadCMake-a65df441f2f1acefd1900382b09c410f9c15f4b2.zip
CMake-a65df441f2f1acefd1900382b09c410f9c15f4b2.tar.gz
CMake-a65df441f2f1acefd1900382b09c410f9c15f4b2.tar.bz2
Merge topic 'vs-no-regen-external-msproject'
e478f03 VS: Fix CMAKE_SUPPRESS_REGENERATION bad ZERO_CHECK dependency (#14378)
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx23
-rw-r--r--Source/cmGlobalVisualStudio8Generator.h2
2 files changed, 14 insertions, 11 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);
+ }
}
}
diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h
index d181742..2376f8a 100644
--- a/Source/cmGlobalVisualStudio8Generator.h
+++ b/Source/cmGlobalVisualStudio8Generator.h
@@ -71,7 +71,7 @@ protected:
virtual bool VSLinksDependencies() const { return false; }
- void AddCheckTarget();
+ bool AddCheckTarget();
static cmIDEFlagTable const* GetExtraFlagTableVS8();
virtual void WriteSLNHeader(std::ostream& fout);