From 1aab3db68b8f5240fb7f01890a945fac72019e0a Mon Sep 17 00:00:00 2001 From: JosiahWI <41302989+JosiahWI@users.noreply.github.com> Date: Sat, 21 Aug 2021 13:16:31 -0500 Subject: [PATCH] Set policies through CMake 3.9 to allow enabling IPO --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6552ef70..eb90eaba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,12 @@ cmake_minimum_required(VERSION 3.5) +# Set policies up to 3.9 since we want to enable the IPO option +if(${CMAKE_VERSION} VERSION_LESS 3.9) + cmake_policy(VERSION ${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}) +else() + cmake_policy(VERSION 3.9) +endif() + project(Irrlicht VERSION 1.9.0 LANGUAGES CXX