Skip to content

Commit ef84c3b

Browse files
authoredAug 23, 2021
Set policies through CMake 3.9 to allow enabling IPO (#11560)
1 parent 63e8224 commit ef84c3b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

Diff for: ‎CMakeLists.txt

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
cmake_minimum_required(VERSION 3.5)
22

3+
# Set policies up to 3.9 since we want to enable the IPO option
4+
if(${CMAKE_VERSION} VERSION_LESS 3.9)
5+
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
6+
else()
7+
cmake_policy(VERSION 3.9)
8+
endif()
9+
310
# This can be read from ${PROJECT_NAME} after project() is called
411
project(minetest)
512
set(PROJECT_NAME_CAPITALIZED "Minetest")

0 commit comments

Comments
 (0)
Please sign in to comment.