diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d4b65e..899d057 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,8 +21,10 @@ endif() if (${CMAKE_VERSION} VERSION_GREATER "3.15.0") cmake_policy(SET CMP0091 NEW) endif() -cmake_policy(SET CMP0069 NEW) -set(CMAKE_POLICY_DEFAULT_CMP0069 NEW) +if (NOT ${CMAKE_VERSION} VERSION_LESS "3.9.0") + cmake_policy(SET CMP0069 NEW) + set(CMAKE_POLICY_DEFAULT_CMP0069 NEW) +endif() project(ASL) cmake_minimum_required(VERSION 3.0) @@ -38,7 +40,11 @@ option(BUILD_DYNRT_LIBS "Build the libraries linked against the dynamic runtime option(BUILD_MT_LIBS "Build the multithreaded library" OFF) option(BUILD_CPP "Build the cpp interface" OFF) option(BUILD_F2C "Build the f2c library" OFF) -option(USE_LTO "Use link time optimization" ON) +if (${CMAKE_VERSION} VERSION_LESS "3.9.0") + option(USE_LTO "Use link time optimization" OFF) +else() + option(USE_LTO "Use link time optimization" ON) +endif() if(NOT BUILD_ASL_EXAMPLES) option(BUILD_ASL_EXAMPLES "Build the examples" OFF)