Skip to content

Commit

Permalink
Use new CMake python-finding package
Browse files Browse the repository at this point in the history
  • Loading branch information
lpereira committed Aug 5, 2024
1 parent e5a6b6c commit 22f1471
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/bin/testrunner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ target_link_libraries(testrunner
)

if (${CMAKE_BUILD_TYPE} MATCHES "Coverage")
find_package(PythonInterp 3)

if (PYTHONINTERP_FOUND)
if (Python3_Interpreter_FOUND)
setup_target_for_coverage(generate-coverage
"${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/scripts/testsuite.py -v ${CMAKE_BINARY_DIR}"
"${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/scripts/testsuite.py -v ${CMAKE_BINARY_DIR}"
coverage
)
add_dependencies(generate-coverage testrunner)
Expand Down
4 changes: 1 addition & 3 deletions src/samples/techempower/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ if (MARIADB_FOUND AND SQLITE_FOUND)
include_directories(BEFORE ${CMAKE_BINARY_DIR})

if (${CMAKE_BUILD_TYPE} MATCHES "Coverage")
find_package(PythonInterp 3)

if (PYTHONINTERP_FOUND)
if (Python3_Interpreter_FOUND)
add_dependencies(generate-coverage techempower)
endif()
endif ()
Expand Down

0 comments on commit 22f1471

Please sign in to comment.