Skip to content

Commit

Permalink
make find_package for Python3 more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
HDembinski committed Apr 25, 2024
1 parent 44fa5eb commit abae0cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt

find_package(Python3)
find_package(Python3 COMPONENTS Interpreter)
if (Python3_FOUND)
# checks that b2 and cmake are in sync
add_test(NAME runpy-${PROJECT_NAME}_check_build_system COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/check_build_system.py)

# checks that all headers are included in odr test
add_test(NAME runpy-${PROJECT_NAME}_check_odr_test COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/check_odr_test.py)
else()
MESSAGE(WARNING "Python interpreter not found, cannot check for odr violations and build system consistency")
endif()

include(BoostTest OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
Expand Down

0 comments on commit abae0cf

Please sign in to comment.