Skip to content

Commit

Permalink
Merge pull request #1758 from ERGO-Code/cmake-version-check
Browse files Browse the repository at this point in the history
version check in ipo detection
  • Loading branch information
galabovaa committed May 11, 2024
2 parents 7d928db + a1b3ae5 commit de38de1
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_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 de38de1

Please sign in to comment.