diff options
author | Brad King <brad.king@kitware.com> | 2010-05-28 14:45:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-05-28 15:09:10 (GMT) |
commit | fe971d97cae4df94d3643c5203b79336cfd31e05 (patch) | |
tree | 2eac2264fe3b44bd915535ba081c2e119999818b /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | d3303dbc8130988be63b9dda913eb9af9770edeb (diff) | |
download | CMake-fe971d97cae4df94d3643c5203b79336cfd31e05.zip CMake-fe971d97cae4df94d3643c5203b79336cfd31e05.tar.gz CMake-fe971d97cae4df94d3643c5203b79336cfd31e05.tar.bz2 |
Add STATIC_LIBRARY_FLAGS_<CONFIG> property (#10768)
This is a per-configuration version of STATIC_LIBRARY_FLAGS.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 13bbc74..53d6594 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1023,22 +1023,27 @@ WriteRCOptions(std::string const& , } -void cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& - ) +void +cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& config) { if(this->Target->GetType() != cmTarget::STATIC_LIBRARY) { return; } - if(const char* libflags = this->Target - ->GetProperty("STATIC_LIBRARY_FLAGS")) + 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) { this->WriteString("<Lib>\n", 2); cmVisualStudioGeneratorOptions libOptions(this->LocalGenerator, 10, cmVisualStudioGeneratorOptions::Linker, cmVS10LibFlagTable, 0, this); - libOptions.Parse(libflags); + libOptions.Parse(libflags?libflags:""); + libOptions.Parse(libflagsConfig?libflagsConfig:""); libOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", ""); libOptions.OutputFlagMap(*this->BuildFileStream, " "); this->WriteString("</Lib>\n", 2); |