Skip to content

Commit

Permalink
version check in ipo detection
Browse files Browse the repository at this point in the history
  • Loading branch information
galabovaa committed May 10, 2024
1 parent 96c3dd2 commit d712a7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Expand Up @@ -188,7 +188,10 @@ if (BUILD_CXX)
set(ipo_supported NO)
message(STATUS "IPO / LTO not currently supported building HiGHS on MinGW")
else()
cmake_policy(SET CMP0138 NEW)
if(CMAKE_VERSION VERSION_MORE VERSION_GREATER "3.23.0")
cmake_policy(SET CMP0138 NEW)
endif()

include(CheckIPOSupported)
check_ipo_supported(RESULT ipo_supported OUTPUT check_ipo_support_output)
message(STATUS "IPO / LTO supported by compiler: ${ipo_supported}")
Expand Down

0 comments on commit d712a7e

Please sign in to comment.