From 9effc5e0fe9d49751cdfb654098ce1a803c45f60 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Tue, 16 Apr 2019 17:42:42 +0000 Subject: [PATCH] Lowered CMake minimum requirement to 3.7.2 Tested on Raspbian --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 29bcd578..6820da24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.7.2) 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) @@ -264,10 +264,12 @@ endforeach() if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") # Enable link-time optimisation if available - include(CheckIPOSupported) - check_ipo_supported(RESULT result) + include(CheckIPOSupported OPTIONAL RESULT_VARIABLE result) if (result) - set_target_properties(CSE2 PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE) + check_ipo_supported(RESULT result) + if (result) + set_target_properties(CSE2 PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE) + endif() endif() endif()