mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 05:39:57 -05:00
Create INTERPROCEDURAL_OPTIMIZATION build feature
This commit creates target and directory properties to enable the Intel interprocedural optimization support on Linux. Enabling it adds the compiler option '-ipo' and uses 'xiar' to create archives. See issue #9615.
This commit is contained in:
@@ -113,6 +113,12 @@ void cmMakefileLibraryTargetGenerator::WriteStaticLibraryRules()
|
||||
}
|
||||
linkRuleVar += "_CREATE_STATIC_LIBRARY";
|
||||
|
||||
if(this->GetFeatureAsBool("INTERPROCEDURAL_OPTIMIZATION") &&
|
||||
this->Makefile->GetDefinition((linkRuleVar+"_IPO").c_str()))
|
||||
{
|
||||
linkRuleVar += "_IPO";
|
||||
}
|
||||
|
||||
std::string extraFlags;
|
||||
this->LocalGenerator->AppendFlags
|
||||
(extraFlags,this->Target->GetProperty("STATIC_LIBRARY_FLAGS"));
|
||||
|
||||
Reference in New Issue
Block a user