1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-31 02:35:46 +01:00

Check for unset CMAKE_BUILD_TYPE

This commit is contained in:
Tom Lankhorst
2019-01-27 13:23:36 +01:00
parent 0789ef541d
commit 9186c8b7d9

View File

@@ -9,7 +9,9 @@ function(ipo_enable IPO_ENABLED_BUILDS)
check_ipo_supported(RESULT IPO_SUPPORTED OUTPUT IPO_LOG)
set(IPO_BUILD_ENABLED OFF PARENT_SCOPE)
if(IPO_SUPPORTED AND ${CMAKE_BUILD_TYPE} IN_LIST IPO_ENABLED_BUILDS)
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "CMAKE_BUILD_TYPE not explicitly set. Not enabling IPO.")
elseif(IPO_SUPPORTED AND ${CMAKE_BUILD_TYPE} IN_LIST IPO_ENABLED_BUILDS)
if(NOT DISABLE_IPO)
message(STATUS "IPO supported and enabled in ${CMAKE_BUILD_TYPE}.")
set(IPO_BUILD_ENABLED ON PARENT_SCOPE)