diff options
author | Brad King <brad.king@kitware.com> | 2006-02-09 23:42:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-02-09 23:42:58 (GMT) |
commit | 1b5e3f41369e8bf6a43c79eb62a4d636caab2b5a (patch) | |
tree | 5bd3900375b7cfb39e6fd067be5dfb819caaa387 /Source/cmLocalVisualStudio6Generator.cxx | |
parent | e666b8e825a59d2adf95eaabfa6685fe28c21067 (diff) | |
download | CMake-1b5e3f41369e8bf6a43c79eb62a4d636caab2b5a.zip CMake-1b5e3f41369e8bf6a43c79eb62a4d636caab2b5a.tar.gz CMake-1b5e3f41369e8bf6a43c79eb62a4d636caab2b5a.tar.bz2 |
BUG: Fixed generation of cmake re-run rules.
Diffstat (limited to 'Source/cmLocalVisualStudio6Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio6Generator.cxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index f3155f6..8873ab6 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -85,6 +85,15 @@ void cmLocalVisualStudio6Generator::OutputDSPFile() 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)) + { + this->AddDSPBuildRule(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) @@ -210,9 +219,9 @@ void cmLocalVisualStudio6Generator::CreateSingleDSP(const char *lname, cmTarget } -void cmLocalVisualStudio6Generator::AddDSPBuildRule() +void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmTarget& tgt) { - std::string dspname = *(m_CreatedProjectNames.end()-1); + std::string dspname = tgt.GetName(); dspname += ".dsp.cmake"; const char* dsprule = m_Makefile->GetRequiredDefinition("CMAKE_COMMAND"); cmCustomCommandLine commandLine; @@ -262,14 +271,6 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout, const char *libName, cmTarget &target) { - // if we should add regen rule then... - const char *suppRegenRule = - m_Makefile->GetDefinition("CMAKE_SUPPRESS_REGENERATION"); - if (!cmSystemTools::IsOn(suppRegenRule)) - { - this->AddDSPBuildRule(); - } - // For utility targets need custom command since pre- and post- // build does not do anything in Visual Studio 6. In order for the // rules to run in the correct order as custom commands, we need |