From 33e6e0b9c2ae26c8d077e577ded49debb75d1070 Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Tue, 30 Jul 2013 12:23:50 +0200 Subject: [PATCH] VS6: Add handling of CMAKE_*_LINKER_FLAGS_ variables Read the content of the config specific linker flags in the Visual Studio 6 generator too. --- Source/cmLocalVisualStudio6Generator.cxx | 36 ++++++++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index 5ca8aba9e..667d86f4c 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -1171,18 +1171,42 @@ void cmLocalVisualStudio6Generator std::string extraLinkOptionsRelWithDebInfo; if(target.GetType() == cmTarget::EXECUTABLE) { - extraLinkOptions = - this->Makefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS"); + extraLinkOptions = this->Makefile-> + GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS"); + extraLinkOptionsDebug = this->Makefile-> + GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS_DEBUG"); + extraLinkOptionsRelease = this->Makefile-> + GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS_RELEASE"); + extraLinkOptionsMinSizeRel = this->Makefile-> + GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS_MINSIZEREL"); + extraLinkOptionsRelWithDebInfo = this->Makefile-> + GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO"); } if(target.GetType() == cmTarget::SHARED_LIBRARY) { - extraLinkOptions = - this->Makefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS"); + extraLinkOptions = this->Makefile-> + GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS"); + extraLinkOptionsDebug = this->Makefile-> + GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS_DEBUG"); + extraLinkOptionsRelease = this->Makefile-> + GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS_RELEASE"); + extraLinkOptionsMinSizeRel = this->Makefile-> + GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL"); + extraLinkOptionsRelWithDebInfo = this->Makefile-> + GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO"); } if(target.GetType() == cmTarget::MODULE_LIBRARY) { - extraLinkOptions = - this->Makefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS"); + extraLinkOptions = this->Makefile-> + GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS"); + extraLinkOptionsDebug = this->Makefile-> + GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS_DEBUG"); + extraLinkOptionsRelease = this->Makefile-> + GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS_RELEASE"); + extraLinkOptionsMinSizeRel = this->Makefile-> + GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL"); + extraLinkOptionsRelWithDebInfo = this->Makefile-> + GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO"); } // Get extra linker options for this target.