Skip to content

Commit

Permalink
Set policies through CMake 3.9 to allow enabling IPO (#11560)
Browse files Browse the repository at this point in the history
  • Loading branch information
JosiahWI committed Aug 23, 2021
1 parent 63e8224 commit ef84c3b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions 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_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
else()
cmake_policy(VERSION 3.9)
endif()

# This can be read from ${PROJECT_NAME} after project() is called
project(minetest)
set(PROJECT_NAME_CAPITALIZED "Minetest")
Expand Down

0 comments on commit ef84c3b

Please sign in to comment.