(CMAKE_)INTERPROCEDURAL_OPTIMIZATION does not work with generator expressions
CMake version 3.16.3
When using any generator expression as the value of INTERPROCEDURAL_OPTIMIZATION
(via set_property
or set_target_properties
) or as the value of CMAKE_INTERPROCEDURAL_OPTIMIZATION
, LTO is always disabled.
Found this with Unix Makefiles on Linux, not sure about other generators.