Skip to content
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
2 changes: 2 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ build_script:
- cmake -G "%CMAKE_GENERATOR%" -A "%CMAKE_ARCH%"
-DCMAKE_CXX_STANDARD=14
-DPYBIND11_WERROR=ON
-DPYBIND11_CATCH_TESTS=ON
-DDOWNLOAD_CATCH=ON
-DPYBIND11_EIGEN_TESTS=ON
-DCMAKE_SUPPRESS_REGENERATION=1
.
- set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
Expand Down
10 changes: 6 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ system with CMake 3.15+:
python3 -m venv .venv
source .venv/bin/activate
pip install -r tests/requirements.txt
cmake -S . -B build -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON
cmake -S . -B build -DPYBIND11_CATCH_TESTS=ON -DPYBIND11_EIGEN_TESTS=ON
cmake --build build -j4
```

Expand Down Expand Up @@ -149,8 +149,10 @@ The valid options are:
classic, deprecated, custom FindPythonLibs
* `-DPYBIND11_NOPYTHON=ON`: Disable all Python searching (disables tests)
* `-DBUILD_TESTING=ON`: Enable the tests
* `-DDOWNLOAD_CATCH=ON`: Download catch to build the C++ tests
* `-DDOWNLOAD_EIGEN=ON`: Download Eigen for the NumPy tests
* `-DPYBIND11_CATCH_TESTS=ON`: Enable tests using catch
(Fetched automatically if missing)
* `-DPYBIND11_EIGEN_TESTS=ON`: Enable testing of Eigen for the NumPy tests
(Fetched automatically if missing)
* `-DPYBIND11_INSTALL=ON/OFF`: Enable the install target (on by default for the
master project)
* `-DUSE_PYTHON_INSTALL_DIR=ON`: Try to install into the python dir
Expand Down Expand Up @@ -295,7 +297,7 @@ recent CMake and Python):
python3 -m venv venv
. venv/bin/activate
pip install pytest
cmake -S . -B build-intel -DCMAKE_CXX_COMPILER=$(which icpc) -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DPYBIND11_WERROR=ON
cmake -S . -B build-intel -DCMAKE_CXX_COMPILER=$(which icpc) -DPYBIND11_CATCH_TESTS=ON -DPYBIND11_EIGEN_TESTS=ON -DPYBIND11_WERROR=ON
```

This will test the PGI compilers:
Expand Down
70 changes: 38 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ jobs:
-DPYBIND11_WERROR=ON
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON
-DPYBIND11_PYTEST_ARGS=-v
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DPYBIND11_CATCH_TESTS=ON
-DPYBIND11_EIGEN_TESTS=ON
-DCMAKE_CXX_STANDARD=14
-DPYBIND11_INTERNALS_VERSION=10000000

Expand Down Expand Up @@ -308,9 +308,11 @@ jobs:
run: >
cmake -S . -B build
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DPYBIND11_CATCH_TESTS=ON
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}"
-DPYBIND11_EIGEN_TESTS=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_Eigen3=ON
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

- name: Build
Expand Down Expand Up @@ -344,7 +346,7 @@ jobs:
run: apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev python3-pytest python3-numpy

- name: Configure
run: cmake -S . -B build -DPYBIND11_CUDA_TESTS=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON
run: cmake -S . -B build -DPYBIND11_CUDA_TESTS=ON -DPYBIND11_WERROR=ON -DPYBIND11_CATCH_TESTS=ON

- name: Build
run: cmake --build build -j2 --verbose
Expand Down Expand Up @@ -382,7 +384,7 @@ jobs:
# run: |
# source /etc/profile.d/modules.sh
# module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/20.11
# cmake -S . -B build -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=14 -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
# cmake -S . -B build -DPYBIND11_CATCH_TESTS=ON -DCMAKE_CXX_STANDARD=14 -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
#
# - name: Build
# run: cmake --build build -j 2 --verbose
Expand Down Expand Up @@ -437,7 +439,7 @@ jobs:
run: |
source /etc/profile.d/modules.sh
module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/25.11
cmake -S . -B build -DDOWNLOAD_CATCH=ON \
cmake -S . -B build -DPYBIND11_CATCH_TESTS=ON \
-DCMAKE_CXX_STANDARD=17 \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \
-DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0" \
Expand Down Expand Up @@ -493,9 +495,11 @@ jobs:
run: >
cmake -S . -B build
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DPYBIND11_CATCH_TESTS=ON
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}"
-DPYBIND11_EIGEN_TESTS=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_Eigen3=ON
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

- name: Build
Expand All @@ -520,7 +524,7 @@ jobs:
run: >
cmake -S . -B build_partial
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DPYBIND11_CATCH_TESTS=ON
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
Expand Down Expand Up @@ -570,8 +574,8 @@ jobs:
set +e; source /opt/intel/oneapi/setvars.sh; set -e
cmake -S . -B build-11 \
-DPYBIND11_WERROR=ON \
-DDOWNLOAD_CATCH=ON \
-DDOWNLOAD_EIGEN=OFF \
-DPYBIND11_CATCH_TESTS=ON \
-DPYBIND11_EIGEN_TESTS=OFF \
-DCMAKE_CXX_STANDARD=11 \
-DCMAKE_CXX_COMPILER=$(which icpc) \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
Expand Down Expand Up @@ -608,8 +612,8 @@ jobs:
set +e; source /opt/intel/oneapi/setvars.sh; set -e
cmake -S . -B build-17 \
-DPYBIND11_WERROR=ON \
-DDOWNLOAD_CATCH=ON \
-DDOWNLOAD_EIGEN=OFF \
-DPYBIND11_CATCH_TESTS=ON \
-DPYBIND11_EIGEN_TESTS=OFF \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_COMPILER=$(which icpc) \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
Expand Down Expand Up @@ -686,8 +690,8 @@ jobs:
cmake -S . -B build
-DCMAKE_BUILD_TYPE=MinSizeRel
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DPYBIND11_CATCH_TESTS=ON
-DPYBIND11_EIGEN_TESTS=ON
-DCMAKE_CXX_STANDARD=11
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

Expand Down Expand Up @@ -744,8 +748,10 @@ jobs:
- name: Configure tests
run: >
cmake ../pybind11-tests
-DDOWNLOAD_CATCH=ON
-DPYBIND11_CATCH_TESTS=ON
-DPYBIND11_WERROR=ON
-DPYBIND11_EIGEN_TESTS=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_Eigen3=ON
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
working-directory: /build-tests

Expand Down Expand Up @@ -838,8 +844,8 @@ jobs:
cmake -S . -B build
-G "Visual Studio 17 2022" -A Win32
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DPYBIND11_CATCH_TESTS=ON
-DPYBIND11_EIGEN_TESTS=ON
${{ matrix.args }}
- name: Build C++11
run: cmake --build build -j 2
Expand Down Expand Up @@ -889,8 +895,8 @@ jobs:
-G "Visual Studio 17 2022" -A Win32
-DCMAKE_BUILD_TYPE=Debug
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DPYBIND11_CATCH_TESTS=ON
-DPYBIND11_EIGEN_TESTS=ON
${{ matrix.args }}
- name: Build C++11
run: cmake --build build --config Debug -j 2
Expand Down Expand Up @@ -929,8 +935,8 @@ jobs:
run: >
cmake -S . -B build
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DPYBIND11_CATCH_TESTS=ON
-DPYBIND11_EIGEN_TESTS=ON
-DCMAKE_CXX_STANDARD=20

- name: Build C++20
Expand All @@ -953,8 +959,8 @@ jobs:
run: >
cmake -S . -B build_partial
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DPYBIND11_CATCH_TESTS=ON
-DPYBIND11_EIGEN_TESTS=ON
-DCMAKE_CXX_STANDARD=20
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"

Expand Down Expand Up @@ -1006,7 +1012,7 @@ jobs:
# LTO leads to many undefined reference like
# `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&)
run: >-
cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON
cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DPYBIND11_WERROR=ON -DPYBIND11_CATCH_TESTS=ON
-DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)")
-S . -B build

Expand All @@ -1031,7 +1037,7 @@ jobs:

- name: Configure C++14
run: >-
cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON
cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DPYBIND11_WERROR=ON -DPYBIND11_CATCH_TESTS=ON
-DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)")
-S . -B build2

Expand All @@ -1056,7 +1062,7 @@ jobs:

- name: Configure C++17
run: >-
cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON
cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DPYBIND11_WERROR=ON -DPYBIND11_CATCH_TESTS=ON
-DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)")
-S . -B build3

Expand Down Expand Up @@ -1124,8 +1130,8 @@ jobs:
cmake -G Ninja -S . -B .
-DPYBIND11_WERROR=OFF
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DPYBIND11_CATCH_TESTS=ON
-DPYBIND11_EIGEN_TESTS=ON
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_STANDARD=17

Expand Down Expand Up @@ -1192,8 +1198,8 @@ jobs:
cmake -G Ninja -S . -B . `
-DPYBIND11_WERROR=OFF `
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF `
-DDOWNLOAD_CATCH=ON `
-DDOWNLOAD_EIGEN=ON `
-DPYBIND11_CATCH_TESTS=ON `
-DPYBIND11_EIGEN_TESTS=ON `
-DCMAKE_CXX_COMPILER=clang++ `
-DCMAKE_CXX_STANDARD=20 `
-DPython_EXECUTABLE="$pythonExecutable" `
Expand Down Expand Up @@ -1267,8 +1273,8 @@ jobs:
run: >-
cmake -S . -B build
-DPYBIND11_WERROR=OFF
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DPYBIND11_CATCH_TESTS=ON
-DPYBIND11_EIGEN_TESTS=ON
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_STANDARD=20
-DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)")
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
# These steps use a directory with a space in it intentionally
- name: Configure
shell: bash
run: cmake -S. -B"build dir" -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON
run: cmake -S. -B"build dir" -DPYBIND11_WERROR=ON -DPYBIND11_CATCH_TESTS=ON

# Only build and test if this was manually triggered in the GitHub UI
- name: Build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ jobs:
cmake -S. -Bbuild -Werror=dev
-DPYBIND11_WERROR=ON
-DPYBIND11_PYTEST_ARGS=-v
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DPYBIND11_CATCH_TESTS=ON
-DPYBIND11_EIGEN_TESTS=ON
${{ inputs.cmake-args }}

- name: Build
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:
run: >
cmake -S . -B build11
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DPYBIND11_CATCH_TESTS=ON
-DPYBIND11_EIGEN_TESTS=ON
-DCMAKE_CXX_STANDARD=11
-DCMAKE_BUILD_TYPE=Debug

Expand All @@ -77,8 +77,8 @@ jobs:
run: >
cmake -S . -B build17
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DPYBIND11_CATCH_TESTS=ON
-DPYBIND11_EIGEN_TESTS=ON
-DCMAKE_CXX_STANDARD=17

- name: Build C++17
Expand All @@ -96,8 +96,8 @@ jobs:
run: >
cmake -S . -B build17max
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DPYBIND11_CATCH_TESTS=ON
-DPYBIND11_EIGEN_TESTS=ON
-DCMAKE_CXX_STANDARD=17
-DPYBIND11_INTERNALS_VERSION=10000000

Expand Down
4 changes: 2 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"DOWNLOAD_CATCH": true,
"DOWNLOAD_EIGEN": true,
"PYBIND11_CATCH_TESTS": true,
"PYBIND11_EIGEN_TESTS": true,
"PYBIND11_FINDPYTHON": "NEW",
"PYBIND11_WERROR": true,
"CMAKE_COLOR_DIAGNOSTICS": true
Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def tests(session: nox.Session) -> None:
"-S.",
f"-B{tmpdir}",
"-DPYBIND11_WERROR=ON",
"-DDOWNLOAD_CATCH=ON",
"-DDOWNLOAD_EIGEN=ON",
"-DPYBIND11_CATCH_TESTS=ON",
"-DPYBIND11_EIGEN_TESTS=ON",
*session.posargs,
)
session.run("cmake", "--build", tmpdir)
Expand Down
Loading
Loading