Files
CMake/Tests/FindBoost/TestPython/CMakeLists.txt
Brad King 6b1f933cb8 Tests: Update FindBoost.TestPython for Python 3.11 and 3.12
Follow up the python 3.11 and 3.12 support from:

* commit 43844c5d82 (FindPython: Add support for Python 3.11,
                     2021-12-07, v3.22.2~20^2)
* commit ca2877c039 (FindPython: add support for Python 3.12,
                     2022-05-11, v3.23.2~15^2)

with an update for the FindBoost test.
2022-11-16 14:34:07 -05:00

18 lines
462 B
CMake

cmake_minimum_required(VERSION 3.14)
project(TestFindBoostPython CXX)
include(CTest)
find_package(Boost OPTIONAL_COMPONENTS python27 python34 python35 python36 python37 python38 python39 python310 python311 python312)
set(FAILTEST TRUE)
foreach (v IN ITEMS 27 34 35 36 37 38 39 310 311 312)
if (Boost_PYTHON${v}_FOUND)
set(FAILTEST FALSE)
break()
endif ()
endforeach ()
if (FAILTEST)
message(FATAL_ERROR "No Boost Python module found")
endif ()