mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05:00
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:
committed by
Brad King
parent
8d3b65346f
commit
14bbf8340a
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user