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.
This commit is contained in:
Patrick Gansterer
2013-07-10 19:11:04 +02:00
committed by Brad King
parent 8d3b65346f
commit 14bbf8340a
6 changed files with 45 additions and 60 deletions
+1 -11
View File
@@ -1039,17 +1039,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
}
}
std::string libflags;
if(const char* flags = target.GetProperty("STATIC_LIBRARY_FLAGS"))
{
libflags += flags;
}
std::string libFlagsConfig = "STATIC_LIBRARY_FLAGS_";
libFlagsConfig += configTypeUpper;
if(const char* flagsConfig = target.GetProperty(libFlagsConfig.c_str()))
{
libflags += " ";
libflags += flagsConfig;
}
this->GetStaticLibraryFlags(libflags, configTypeUpper, &target);
if(!libflags.empty())
{
fout << "\t\t\t\tAdditionalOptions=\"" << libflags << "\"\n";