From 588bb42b6d8c3110737ea500fe87bde2e1f92dc4 Mon Sep 17 00:00:00 2001 From: Marc Schefer Date: Tue, 31 Mar 2026 13:39:41 +0200 Subject: [PATCH 1/2] remove FindBoostPython.cmake, it should not be needed anymore --- SEImplementation/CMakeLists.txt | 7 +++---- cmake/modules/FindBoostPython.cmake | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/SEImplementation/CMakeLists.txt b/SEImplementation/CMakeLists.txt index 1b52a93d3..49981ff12 100644 --- a/SEImplementation/CMakeLists.txt +++ b/SEImplementation/CMakeLists.txt @@ -33,8 +33,7 @@ elements_depends_on_subdirs(Pyston) find_package(PythonInterp ${PYTHON_EXPLICIT_VERSION} REQUIRED) find_package(PythonLibs ${PYTHON_EXPLICIT_VERSION} REQUIRED) -find_package(BoostPython ${PYTHON_EXPLICIT_VERSION}) -find_package(Boost 1.53 REQUIRED) +find_package(Boost 1.53 REQUIRED COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}) find_package(OnnxRuntime) find_package(Log4CPP REQUIRED) @@ -101,10 +100,10 @@ elements_add_library(SEImplementation LINK_LIBRARIES ElementsKernel Configuration Table SEUtils SEFramework ModelFitting - BoostPython PythonLibs PythonInterp + PythonLibs PythonInterp Pyston ${OPT_LIBRARIES} - INCLUDE_DIRS ${BoostPython_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${OPT_INCLUDES} + INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS} ${OPT_INCLUDES} PUBLIC_HEADERS SEImplementation) #=============================================================================== diff --git a/cmake/modules/FindBoostPython.cmake b/cmake/modules/FindBoostPython.cmake index 69fbcc596..dd19374be 100644 --- a/cmake/modules/FindBoostPython.cmake +++ b/cmake/modules/FindBoostPython.cmake @@ -1,6 +1,6 @@ # Normally, finding a boost component should rely on # find_package(Boost REQUIRED COMPONENTS python) -# But the packaging is now always the same: sometimes it will be python3, +# But the packaging is not always the same: sometimes it will be python3, # others python37, python2, python27, or just python # (i.e. python3 for Fedora < 30, but python37 for Fedora >= 30 and MacOSX via Homebrew) # We wrap all this in this module From c7559ec346771ae181eb66a48f5eac23db29fa31 Mon Sep 17 00:00:00 2001 From: Marc Schefer Date: Tue, 31 Mar 2026 13:48:01 +0200 Subject: [PATCH 2/2] actually delete the file --- cmake/modules/FindBoostPython.cmake | 38 ----------------------------- 1 file changed, 38 deletions(-) delete mode 100644 cmake/modules/FindBoostPython.cmake diff --git a/cmake/modules/FindBoostPython.cmake b/cmake/modules/FindBoostPython.cmake deleted file mode 100644 index dd19374be..000000000 --- a/cmake/modules/FindBoostPython.cmake +++ /dev/null @@ -1,38 +0,0 @@ -# Normally, finding a boost component should rely on -# find_package(Boost REQUIRED COMPONENTS python) -# But the packaging is not always the same: sometimes it will be python3, -# others python37, python2, python27, or just python -# (i.e. python3 for Fedora < 30, but python37 for Fedora >= 30 and MacOSX via Homebrew) -# We wrap all this in this module -# -# Defines: -# BoostPython_FOUND -# BoostPython_INCLUDE_DIRS -# BoostPython_LIBRARIES - -if (NOT BoostPython_FOUND) - find_package(PythonInterp ${PYTHON_EXPLICIT_VERSION} REQUIRED) - - # Explicit versions - set (_BOOST_PYTHON_LIST "python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}" "python${PYTHON_VERSION_MAJOR}") - - # Only for python2, without suffix - if (BoostPython_FIND_VERSION VERSION_LESS 3) - list (APPEND _BOOST_PYTHON_LIST "python") - endif () - - # Pick the most restrictive - foreach (_BOOST_PYTHON IN LISTS _BOOST_PYTHON_LIST) - find_package(Boost COMPONENTS "${_BOOST_PYTHON}") - if (Boost_FOUND) - set (BoostPython_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}) - set (BoostPython_LIBRARIES ${Boost_LIBRARIES}) - set (BoostPython_FOUND TRUE) - break () - endif () - endforeach () - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(BoostPython DEFAULT_MSG BoostPython_INCLUDE_DIRS) - mark_as_advanced(BoostPython_FOUND BoostPython_INCLUDE_DIRS BoostPython_LIBRARIES) -endif ()