mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Previously the `INTERPROCEDURAL_OPTIMIZATION` target property was honored only for the Intel compiler on Linux and otherwise ignored. In order to add support for more compilers incrementally without changing behavior in the future, add a new policy whose NEW behavior enforces the `INTERPROCEDURAL_OPTIMIZATION` property. Add flags for supported compilers and otherwise produce an error.
5 lines
132 B
CMake
5 lines
132 B
CMake
cmake_policy(SET CMP0069 OLD)
|
|
|
|
add_executable(foo main.cpp)
|
|
set_target_properties(foo PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
|