From 1588a577d16cfb1a689a444b1db1df3ccff2cc3d Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 9 Mar 2017 21:05:19 +0800 Subject: 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. --- Modules/CheckIPOSupported/CMakeLists-C.txt.in | 2 +- Modules/CheckIPOSupported/CMakeLists-CXX.txt.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Modules/CheckIPOSupported') diff --git a/Modules/CheckIPOSupported/CMakeLists-C.txt.in b/Modules/CheckIPOSupported/CMakeLists-C.txt.in index d20f31f2dd..5a3b8ee326 100644 --- a/Modules/CheckIPOSupported/CMakeLists-C.txt.in +++ b/Modules/CheckIPOSupported/CMakeLists-C.txt.in @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION "@CMAKE_VERSION@") project("@TRY_COMPILE_PROJECT_NAME@" LANGUAGES C) -# TODO: IPO policy +cmake_policy(SET CMP0069 NEW) add_library(foo foo.c) add_executable(boo main.c) diff --git a/Modules/CheckIPOSupported/CMakeLists-CXX.txt.in b/Modules/CheckIPOSupported/CMakeLists-CXX.txt.in index 4b55c70f97..30993fa409 100644 --- a/Modules/CheckIPOSupported/CMakeLists-CXX.txt.in +++ b/Modules/CheckIPOSupported/CMakeLists-CXX.txt.in @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION "@CMAKE_VERSION@") project("@TRY_COMPILE_PROJECT_NAME@" LANGUAGES CXX) -# TODO: IPO policy +cmake_policy(SET CMP0069 NEW) add_library(foo foo.cpp) add_executable(boo main.cpp) -- cgit v1.2.1