Commit fc4324a2 authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'Boost-Gentoo'

0b54f72e FindBoost: Fix detection with version suffixes on Gentoo
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3237
parents 5ec9d16b 0b54f72e
Pipeline #134790 passed with stage
in 0 seconds
...@@ -1777,7 +1777,7 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) ...@@ -1777,7 +1777,7 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}") list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}") list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
# Gentoo # Gentoo
list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}") list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}.${COMPONENT_PYTHON_VERSION_MINOR}")
# RPMs # RPMs
list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}") list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
endif() endif()
......
...@@ -33,3 +33,16 @@ add_test(NAME FindBoost.TestHeaders COMMAND ...@@ -33,3 +33,16 @@ add_test(NAME FindBoost.TestHeaders COMMAND
--build-options ${build_options} --build-options ${build_options}
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
) )
if (CMake_TEST_FindBoost_Python)
add_test(NAME FindBoost.TestPython COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
--build-and-test
"${CMake_SOURCE_DIR}/Tests/FindBoost/TestPython"
"${CMake_BINARY_DIR}/Tests/FindBoost/TestPython"
${build_generator_args}
--build-project TestFindBoostPython
--build-options ${build_options}
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
endif ()
cmake_minimum_required(VERSION 3.14)
project(TestFindBoostPython CXX)
include(CTest)
find_package(Boost OPTIONAL_COMPONENTS python27 python34 python35 python36 python37)
set(FAILTEST TRUE)
foreach (v IN ITEMS 27 34 35 36 37)
if (Boost_PYTHON${v}_FOUND)
set(FAILTEST FALSE)
break()
endif ()
endforeach ()
if (FAILTEST)
message(FATAL_ERROR "No Boost Python module found")
endif ()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment