Skip to content

Commit

Permalink
Fail if the version of Python found is too old (#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbezault authored May 12, 2020
1 parent 7353cd1 commit fec52ca
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ add_subdirectory(tr1)
# chance to add to the config map and test directory global properties.
add_subdirectory(utils/stl-lit)

set(Python_FIND_STRATEGY VERSION)
find_package(Python3)
find_package(Python "3.8" REQUIRED COMPONENTS Interpreter)

if(NOT DEFINED LIT_FLAGS)
list(APPEND LIT_FLAGS "-o" "${CMAKE_CURRENT_BINARY_DIR}/test_results.json")
Expand All @@ -30,4 +29,4 @@ list(APPEND STL_LIT_COMMAND "${STL_LIT_OUTPUT}"
"${LIT_FLAGS}"
"${STL_LIT_TEST_DIRS}")

add_test(NAME stl COMMAND ${Python3_EXECUTABLE} ${STL_LIT_COMMAND} COMMAND_EXPAND_LISTS)
add_test(NAME stl COMMAND ${Python_EXECUTABLE} ${STL_LIT_COMMAND} COMMAND_EXPAND_LISTS)

0 comments on commit fec52ca

Please sign in to comment.