Skip to content

Commit

Permalink
resolved a warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
jongbongan committed Oct 11, 2024
1 parent 4cf0296 commit 2ab23de
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,24 @@ if (NOT DEFINED QL_BOOST_VERSION)
if (CMAKE_CXX_STANDARD GREATER_EQUAL 20)
set(QL_BOOST_VERSION 1.75.0)
else()
set(QL_BOOST_VERSION 1.58.0)
if (POLICY CMP0167)
# Boost 1.70.0 or greater required for finding config-based boost package
set(QL_BOOST_VERSION 1.70.0)
else()
set(QL_BOOST_VERSION 1.58.0)
endif()
endif()
endif()

if (CMAKE_CXX_COMPILER STREQUAL "icpx")
find_package(IntelDPCPP REQUIRED)
endif()

find_package(Boost ${QL_BOOST_VERSION} REQUIRED)
if (POLICY CMP0167)
find_package(Boost ${QL_BOOST_VERSION} CONFIG REQUIRED)
else()
find_package(Boost ${QL_BOOST_VERSION} REQUIRED)
endif()

# Do not warn about Boost versions higher than 1.58.0
set(Boost_NO_WARN_NEW_VERSIONS ON)
Expand Down

0 comments on commit 2ab23de

Please sign in to comment.