added option to shut off automatic rebuilding

This commit is contained in:
Ken Martin 2003-02-06 15:18:43 -05:00
parent fea02da5bd
commit 61da8f64bf
2 changed files with 28 additions and 13 deletions

View File

@ -247,8 +247,14 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
// Write the DSP file's header. // Write the DSP file's header.
this->WriteDSPHeader(fout, libName, target, sourceGroups); this->WriteDSPHeader(fout, libName, target, sourceGroups);
// if we should add regen rule then...
const char *suppRegenRule =
m_Makefile->GetDefinition("CMAKE_SUPPRESS_REGENERATION");
// Find the group in which the CMakeLists.txt source belongs, and add // Find the group in which the CMakeLists.txt source belongs, and add
// the rule to generate this DSP file. // the rule to generate this DSP file.
if (!cmSystemTools::IsOn(suppRegenRule))
{
for(std::vector<cmSourceGroup>::reverse_iterator sg = sourceGroups.rbegin(); for(std::vector<cmSourceGroup>::reverse_iterator sg = sourceGroups.rbegin();
sg != sourceGroups.rend(); ++sg) sg != sourceGroups.rend(); ++sg)
{ {
@ -258,6 +264,7 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
break; break;
} }
} }
}
// Loop through every source group. // Loop through every source group.
for(std::vector<cmSourceGroup>::const_iterator sg = sourceGroups.begin(); for(std::vector<cmSourceGroup>::const_iterator sg = sourceGroups.begin();

View File

@ -656,9 +656,17 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
this->WriteConfigurations(fout, libName, target); this->WriteConfigurations(fout, libName, target);
fout << "\t<Files>\n"; fout << "\t<Files>\n";
// if we should add regen rule then...
const char *suppRegenRule =
m_Makefile->GetDefinition("CMAKE_SUPPRESS_REGENERATION");
// Find the group in which the CMakeLists.txt source belongs, and add // Find the group in which the CMakeLists.txt source belongs, and add
// the rule to generate this VCProj file. // the rule to generate this VCProj file.
for(std::vector<cmSourceGroup>::reverse_iterator sg = sourceGroups.rbegin(); if (!cmSystemTools::IsOn(suppRegenRule))
{
for(std::vector<cmSourceGroup>::reverse_iterator sg =
sourceGroups.rbegin();
sg != sourceGroups.rend(); ++sg) sg != sourceGroups.rend(); ++sg)
{ {
if(sg->Matches("CMakeLists.txt")) if(sg->Matches("CMakeLists.txt"))
@ -667,7 +675,7 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
break; break;
} }
} }
}
// Loop through every source group. // Loop through every source group.
for(std::vector<cmSourceGroup>::const_iterator sg = sourceGroups.begin(); for(std::vector<cmSourceGroup>::const_iterator sg = sourceGroups.begin();