diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2005-05-12 17:27:48 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2005-05-12 17:27:48 (GMT) |
commit | 70ed04df052ac8fa6d567778598eee0f407f313c (patch) | |
tree | 385cdd2c0600c3f0cd2c71b643d0e588c44c95a2 /Source | |
parent | 32aef87e3baeee18264853739971dc63bc785077 (diff) | |
download | CMake-70ed04df052ac8fa6d567778598eee0f407f313c.zip CMake-70ed04df052ac8fa6d567778598eee0f407f313c.tar.gz CMake-70ed04df052ac8fa6d567778598eee0f407f313c.tar.bz2 |
ENH: fix for bug where debug, release etc flags were not used for linker options, BUG 1781 fix
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index f92bbb0..b3af98b 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -573,9 +573,9 @@ void cmLocalVisualStudio7Generator::FillFlagMapFromCommandFlags( void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, - const char* configName, - const char *libName, - const cmTarget &target) + const char* configName, + const char *libName, + const cmTarget &target) { std::string temp; std::string debugPostfix = ""; @@ -586,17 +586,27 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, } std::string extraLinkOptions; + std::string flagVar; if(target.GetType() == cmTarget::EXECUTABLE) { - extraLinkOptions = m_Makefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS"); + flagVar = "CMAKE_EXE_LINKER_FLAGS"; } if(target.GetType() == cmTarget::SHARED_LIBRARY) { - extraLinkOptions = m_Makefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS"); + flagVar = "CMAKE_SHARED_LINKER_FLAGS"; } if(target.GetType() == cmTarget::MODULE_LIBRARY) { - extraLinkOptions = m_Makefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS"); + flagVar = "CMAKE_MODULE_LINKER_FLAGS"; + } + extraLinkOptions = m_Makefile->GetRequiredDefinition(flagVar.c_str()); + // Now add _DEBUG, _RELEASE, etc version of flagVar + if(configName) + { + flagVar += "_"; + flagVar += cmSystemTools::UpperCase(std::string(configName)); + extraLinkOptions += " "; + extraLinkOptions += m_Makefile->GetRequiredDefinition(flagVar.c_str()); } const char* targetLinkFlags = target.GetProperty("LINK_FLAGS"); |