summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2003-02-06 20:18:43 (GMT)
committerKen Martin <ken.martin@kitware.com>2003-02-06 20:18:43 (GMT)
commit61da8f64bf1db35d49325dba2067187a92e9b7ce (patch)
tree9c2ae7943eb41e536c7fd30a665e1b92baa213d3 /Source
parentfea02da5bdeb2b8c3043c4bbd3bdb184e04a58e5 (diff)
downloadCMake-61da8f64bf1db35d49325dba2067187a92e9b7ce.zip
CMake-61da8f64bf1db35d49325dba2067187a92e9b7ce.tar.gz
CMake-61da8f64bf1db35d49325dba2067187a92e9b7ce.tar.bz2
added option to shut off automatic rebuilding
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx19
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx22
2 files changed, 28 insertions, 13 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 6a1df06..5f0586d 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -247,16 +247,23 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
// Write the DSP file's header.
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
// the rule to generate this DSP file.
- for(std::vector<cmSourceGroup>::reverse_iterator sg = sourceGroups.rbegin();
- sg != sourceGroups.rend(); ++sg)
+ if (!cmSystemTools::IsOn(suppRegenRule))
{
- if(sg->Matches("CMakeLists.txt"))
+ for(std::vector<cmSourceGroup>::reverse_iterator sg = sourceGroups.rbegin();
+ sg != sourceGroups.rend(); ++sg)
{
- this->AddDSPBuildRule(*sg);
- break;
- }
+ if(sg->Matches("CMakeLists.txt"))
+ {
+ this->AddDSPBuildRule(*sg);
+ break;
+ }
+ }
}
// Loop through every source group.
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 87e8e63..69064ff 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -656,18 +656,26 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
this->WriteConfigurations(fout, libName, target);
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
// the rule to generate this VCProj file.
- for(std::vector<cmSourceGroup>::reverse_iterator sg = sourceGroups.rbegin();
- sg != sourceGroups.rend(); ++sg)
+ if (!cmSystemTools::IsOn(suppRegenRule))
{
- if(sg->Matches("CMakeLists.txt"))
+ for(std::vector<cmSourceGroup>::reverse_iterator sg =
+ sourceGroups.rbegin();
+ sg != sourceGroups.rend(); ++sg)
{
- this->AddVCProjBuildRule(*sg);
- break;
- }
+ if(sg->Matches("CMakeLists.txt"))
+ {
+ this->AddVCProjBuildRule(*sg);
+ break;
+ }
+ }
}
-
// Loop through every source group.
for(std::vector<cmSourceGroup>::const_iterator sg = sourceGroups.begin();