Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATION

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.
This commit is contained in:
Ruslan Baratov
2017-03-09 21:05:19 +08:00
committed by Brad King
parent a75757004b
commit 1588a577d1
38 changed files with 283 additions and 5 deletions

View File

@@ -39,6 +39,7 @@ macro(__linux_compiler_intel lang)
"${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"${XIAR} -s <TARGET> ")
set(_CMAKE_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES)
set(_CMAKE_IPO_LEGACY_BEHAVIOR YES)
else()
set(_CMAKE_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO)
endif()