Skip to content

Commit

Permalink
Merge pull request #20 from mjacobse/support_old_cmake_without_ipo
Browse files Browse the repository at this point in the history
Allow old CMake versions without IPO support
  • Loading branch information
glebbelov authored Nov 10, 2024
2 parents 2f5d9de + de9601d commit 6fc7cc2
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 6fc7cc2

Please sign in to comment.