Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cmake policy #2102

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
vsversion: 2022
- name: Compile
env:
BOOST_ROOT: C:\local\boost
BOOST_DIR: C:\local\boost\lib64-msvc-14.3\cmake\Boost-1.85.0
shell: cmd
run: |
mkdir build
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
vsversion: 2022
- name: Compile
env:
BOOST_ROOT: C:\local\boost
BOOST_DIR: C:\local\boost\lib64-msvc-14.3\cmake\Boost-1.85.0
shell: cmd
run: |
mkdir build
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
vsversion: 2022
- name: Compile
env:
BOOST_ROOT: C:\local\boost
BOOST_DIR: C:\local\boost\lib64-msvc-14.3\cmake\Boost-1.85.0
shell: cmd
run: |
cmake --preset windows-ci-build-with-nonstandard-options -L
Expand Down
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
Loading