summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorPatrick Gansterer <paroga@paroga.com>2013-07-10 17:11:04 (GMT)
committerBrad King <brad.king@kitware.com>2013-07-31 12:41:07 (GMT)
commit14bbf8340ac4d285b61afb5b61ebc4c730f4b4fa (patch)
treef8ee4cb65582a6135748647e7830d28e66fc30d0 /Source/cmVisualStudio10TargetGenerator.cxx
parent8d3b65346f112d2d21efd3105f4d1535adc2935e (diff)
downloadCMake-14bbf8340ac4d285b61afb5b61ebc4c730f4b4fa.zip
CMake-14bbf8340ac4d285b61afb5b61ebc4c730f4b4fa.tar.gz
CMake-14bbf8340ac4d285b61afb5b61ebc4c730f4b4fa.tar.bz2
Unify the way the flags of a static library are read
Introduce cmLocalGenerator::GetStaticLibraryFlags() to have a central function for getting the linker flags for a given target.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index d59de11..da5696a 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1417,20 +1417,17 @@ cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& config)
{
return;
}
- const char* libflags = this->Target->GetProperty("STATIC_LIBRARY_FLAGS");
- std::string flagsConfigVar = "STATIC_LIBRARY_FLAGS_";
- flagsConfigVar += cmSystemTools::UpperCase(config);
- const char* libflagsConfig =
- this->Target->GetProperty(flagsConfigVar.c_str());
- if(libflags || libflagsConfig)
+ std::string libflags;
+ this->LocalGenerator->GetStaticLibraryFlags(libflags,
+ cmSystemTools::UpperCase(config), this->Target);
+ if(!libflags.empty())
{
this->WriteString("<Lib>\n", 2);
cmVisualStudioGeneratorOptions
libOptions(this->LocalGenerator,
cmVisualStudioGeneratorOptions::Linker,
cmVSGetLibFlagTable(this->LocalGenerator), 0, this);
- libOptions.Parse(libflags?libflags:"");
- libOptions.Parse(libflagsConfig?libflagsConfig:"");
+ libOptions.Parse(libflags.c_str());
libOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
libOptions.OutputFlagMap(*this->BuildFileStream, " ");
this->WriteString("</Lib>\n", 2);