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 deleted file mode 100644 index 69fbcc596..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 now 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 ()