Replace deprecated find_package for python (#393)

* Replace deprecated find_package for python
* update cmake minimum version

---------

Co-authored-by: Hans Dembinski <hans.dembinski@gmail.com>
This commit is contained in:
Matt Borland 2024-04-23 14:11:46 +02:00 committed by GitHub
parent a29729e668
commit cda7447c97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 18 additions and 15 deletions

View File

@ -22,7 +22,7 @@ jobs:
cov:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Fetch Boost superproject
run: |
cd ..

View File

@ -32,7 +32,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: prepare build
run: |
mkdir build

View File

@ -25,7 +25,7 @@ jobs:
appleclang:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Fetch Boost superproject
run: |
cd ..
@ -46,13 +46,13 @@ jobs:
cd libs/histogram
../../b2 $B2_OPTS cxxstd=17 test//all
gcc5:
runs-on: ubuntu-18.04
gcc7:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: egor-tensin/setup-gcc@v1
with:
version: 5
version: 7
- name: Fetch Boost superproject
run: |
cd ..
@ -60,6 +60,7 @@ jobs:
cd boost
mv -f $GITHUB_WORKSPACE/* libs/histogram
git submodule update --init --depth 5 tools/build tools/boostdep
git submodule update --init --depth 5 libs/format
python tools/boostdep/depinst/depinst.py --git_args "--depth 5 --jobs 3" histogram
mv -f * $GITHUB_WORKSPACE
- name: Prepare b2
@ -67,12 +68,12 @@ jobs:
- name: Test cxxstd=14 (warnings ignored)
run: |
cd libs/histogram
../../b2 -q -j2 toolset=gcc-5 cxxstd=14 test//all examples
../../b2 -q -j2 toolset=gcc-7 cxxstd=14 test//all examples
gcc10:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Fetch Boost superproject
run: |
cd ..
@ -80,6 +81,7 @@ jobs:
cd boost
mv -f $GITHUB_WORKSPACE/* libs/histogram
git submodule update --init --depth 5 tools/build tools/boostdep
git submodule update --init --depth 5 libs/format
python tools/boostdep/depinst/depinst.py --git_args "--depth 5 --jobs 3" histogram
mv -f * $GITHUB_WORKSPACE
- name: Prepare b2
@ -92,7 +94,7 @@ jobs:
clang14:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Fetch Boost superproject
run: |
cd ..

View File

@ -14,7 +14,7 @@ jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Fetch Boost superproject
run: |
cd ..

1
.gitignore vendored
View File

@ -13,3 +13,4 @@ tools/codecov
coverage-report
.cache
venv
.pytest_cache

View File

@ -2,8 +2,8 @@
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
# We support CMake 3.5, but prefer 3.16 policies and behavior
cmake_minimum_required(VERSION 3.5...3.16)
# We support CMake 3.12, but prefer 3.27 policies and behavior
cmake_minimum_required(VERSION 3.12...3.27)
project(boost_histogram VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)

View File

@ -2,7 +2,7 @@
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
find_package(PythonInterp)
find_package(Python3)
if (PYTHONINTERP_FOUND)
# checks that b2 and cmake are in sync
add_test(NAME runpy-${PROJECT_NAME}_check_build_system COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/check_build_system.py)
@ -152,4 +152,4 @@ if (NOT(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERS
endif()
endif()
endif()