Fix backwards-incompatible CMake nonsense
This commit is contained in:
parent
9effc5e0fe
commit
7e038bc24a
1 changed files with 7 additions and 3 deletions
|
@ -1,5 +1,9 @@
|
||||||
cmake_minimum_required(VERSION 3.7.2)
|
cmake_minimum_required(VERSION 3.7.2)
|
||||||
|
|
||||||
|
if ((${CMAKE_VERSION} VERSION_EQUAL 3.9) OR (${CMAKE_VERSION} VERSION_GREATER 3.9))
|
||||||
|
cmake_policy(SET CMP0069 NEW)
|
||||||
|
endif()
|
||||||
|
|
||||||
option(STATIC "Produce a statically-linked executable (good for Windows builds, so you don't need to bundle DLL files)" OFF)
|
option(STATIC "Produce a statically-linked executable (good for Windows builds, so you don't need to bundle DLL files)" OFF)
|
||||||
option(JAPANESE "Enable the Japanese-language build" OFF)
|
option(JAPANESE "Enable the Japanese-language build" OFF)
|
||||||
option(FIX_BUGS "Fix certain bugs (see src/Bug Fixes.txt)" OFF)
|
option(FIX_BUGS "Fix certain bugs (see src/Bug Fixes.txt)" OFF)
|
||||||
|
@ -263,9 +267,9 @@ foreach(FILENAME IN LISTS RESOURCES)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
# Enable link-time optimisation if available
|
if ((${CMAKE_VERSION} VERSION_EQUAL 3.9) OR (${CMAKE_VERSION} VERSION_GREATER 3.9))
|
||||||
include(CheckIPOSupported OPTIONAL RESULT_VARIABLE result)
|
# Enable link-time optimisation if available
|
||||||
if (result)
|
include(CheckIPOSupported)
|
||||||
check_ipo_supported(RESULT result)
|
check_ipo_supported(RESULT result)
|
||||||
if (result)
|
if (result)
|
||||||
set_target_properties(CSE2 PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
|
set_target_properties(CSE2 PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||||
|
|
Loading…
Add table
Reference in a new issue