summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-02-09 23:42:58 (GMT)
committerBrad King <brad.king@kitware.com>2006-02-09 23:42:58 (GMT)
commit1b5e3f41369e8bf6a43c79eb62a4d636caab2b5a (patch)
tree5bd3900375b7cfb39e6fd067be5dfb819caaa387 /Source/cmLocalVisualStudio7Generator.cxx
parente666b8e825a59d2adf95eaabfa6685fe28c21067 (diff)
downloadCMake-1b5e3f41369e8bf6a43c79eb62a4d636caab2b5a.zip
CMake-1b5e3f41369e8bf6a43c79eb62a4d636caab2b5a.tar.gz
CMake-1b5e3f41369e8bf6a43c79eb62a4d636caab2b5a.tar.bz2
BUG: Fixed generation of cmake re-run rules.
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx23
1 files changed, 12 insertions, 11 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 4b03bbd..02db5aa 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -101,6 +101,16 @@ void cmLocalVisualStudio7Generator::OutputVCProjFile()
for(cmTargets::iterator l = tgts.begin();
l != tgts.end(); l++)
{
+ // Add a rule to regenerate the build system when the target
+ // specification source changes.
+ const char* suppRegenRule =
+ m_Makefile->GetDefinition("CMAKE_SUPPRESS_REGENERATION");
+ if (!cmSystemTools::IsOn(suppRegenRule) &&
+ (strcmp(l->first.c_str(), CMAKE_CHECK_BUILD_SYSTEM_TARGET) != 0))
+ {
+ this->AddVCProjBuildRule(l->second);
+ }
+
// INCLUDE_EXTERNAL_MSPROJECT command only affects the workspace
// so don't build a projectfile for it
if ((l->second.GetType() != cmTarget::INSTALL_FILES)
@@ -213,9 +223,9 @@ void cmLocalVisualStudio7Generator::CreateSingleVCProj(const char *lname, cmTarg
}
-void cmLocalVisualStudio7Generator::AddVCProjBuildRule()
+void cmLocalVisualStudio7Generator::AddVCProjBuildRule(cmTarget& tgt)
{
- std::string dspname = *(m_CreatedProjectNames.end()-1);
+ std::string dspname = tgt.GetName();
dspname += ".vcproj.cmake";
const char* dsprule = m_Makefile->GetRequiredDefinition("CMAKE_COMMAND");
cmCustomCommandLine commandLine;
@@ -970,15 +980,6 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
static_cast<cmGlobalVisualStudio7Generator *>
(m_GlobalGenerator)->GetConfigurations();
- // if we should add regen rule then...
- const char *suppRegenRule =
- m_Makefile->GetDefinition("CMAKE_SUPPRESS_REGENERATION");
- if (!cmSystemTools::IsOn(suppRegenRule) &&
- (strcmp(libName, CMAKE_CHECK_BUILD_SYSTEM_TARGET) != 0))
- {
- this->AddVCProjBuildRule();
- }
-
// trace the visual studio dependencies
std::string name = libName;
name += ".vcproj.cmake";