Skip to content

Commit

Permalink
Allow old CMake versions without IPO support
Browse files Browse the repository at this point in the history
  • Loading branch information
mjacobse committed Nov 7, 2024
1 parent 2f5d9de commit de9601d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit de9601d

Please sign in to comment.