Add standard ipo variant to CMakePackage.
Rationale
CMake exposes the CMAKE_INTERPROCEDURAL_OPTIMIZATION variable to enable IPO/LTO on all targets in a project. Similar to the standard build_type variant for CMake, Spack should have a standard ipo variant (defaulting to False) that enables CMAKE_INTERPROCEDURAL_OPTIMIZATION.
Description
# lib/spack/spack/build_systems/cmake.py
variant('ipo', default=False, description='CMake interprocedural optimization')
def _std_args(pkg):
...
try:
ipo = pkg.spec.variants['ipo'].value
except KeyError:
ipo = False
args = [
'-G', generator,
define('CMAKE_INSTALL_PREFIX', pkg.prefix),
define('CMAKE_BUILD_TYPE', build_type),
define_from_variant('CMAKE_INTERPROCEDURAL_OPTIMIZATION', ipo),
]
Additional information
Spack 0.15.4-710-125191931
General information
Add standard
ipovariant to CMakePackage.Rationale
CMake exposes the
CMAKE_INTERPROCEDURAL_OPTIMIZATIONvariable to enable IPO/LTO on all targets in a project. Similar to the standardbuild_typevariant for CMake, Spack should have a standardipovariant (defaulting toFalse) that enablesCMAKE_INTERPROCEDURAL_OPTIMIZATION.Description
Additional information
Spack 0.15.4-710-125191931
General information
spack --versionand reported the version of Spack