Merge topic 'vs-no-regen-external-msproject'

e478f03 VS: Fix CMAKE_SUPPRESS_REGENERATION bad ZERO_CHECK dependency (#14378)
This commit is contained in:
Brad King 2013-10-07 15:41:44 -04:00 committed by CMake Topic Stage
commit a65df441f2
2 changed files with 14 additions and 11 deletions

View File

@ -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 // Add a special target on which all other targets depend that
// checks the build system and optionally re-runs CMake. // 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. // Skip the target if no regeneration is to be done.
if(mf->IsOn("CMAKE_SUPPRESS_REGENERATION")) if(mf->IsOn("CMAKE_SUPPRESS_REGENERATION"))
{ {
return; return false;
} }
std::string cmake_command = mf->GetRequiredDefinition("CMAKE_COMMAND"); std::string cmake_command = mf->GetRequiredDefinition("CMAKE_COMMAND");
@ -315,13 +315,15 @@ void cmGlobalVisualStudio8Generator::AddCheckTarget()
cmSystemTools::Error("Error adding rule for ", stamps[0].c_str()); cmSystemTools::Error("Error adding rule for ", stamps[0].c_str());
} }
} }
return true;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmGlobalVisualStudio8Generator::Generate() void cmGlobalVisualStudio8Generator::Generate()
{ {
this->AddCheckTarget(); if(this->AddCheckTarget())
{
// All targets depend on the build-system check target. // All targets depend on the build-system check target.
for(std::map<cmStdString,cmTarget *>::const_iterator for(std::map<cmStdString,cmTarget *>::const_iterator
ti = this->TotalTargets.begin(); ti = this->TotalTargets.begin();
@ -332,6 +334,7 @@ void cmGlobalVisualStudio8Generator::Generate()
ti->second->AddUtility(CMAKE_CHECK_BUILD_SYSTEM_TARGET); ti->second->AddUtility(CMAKE_CHECK_BUILD_SYSTEM_TARGET);
} }
} }
}
// Now perform the main generation. // Now perform the main generation.
this->cmGlobalVisualStudio7Generator::Generate(); this->cmGlobalVisualStudio7Generator::Generate();

View File

@ -71,7 +71,7 @@ protected:
virtual bool VSLinksDependencies() const { return false; } virtual bool VSLinksDependencies() const { return false; }
void AddCheckTarget(); bool AddCheckTarget();
static cmIDEFlagTable const* GetExtraFlagTableVS8(); static cmIDEFlagTable const* GetExtraFlagTableVS8();
virtual void WriteSLNHeader(std::ostream& fout); virtual void WriteSLNHeader(std::ostream& fout);