Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,11 @@ find_package(Python3 COMPONENTS Interpreter)
function(add_python_test name)
if(Python3_Interpreter_FOUND)
add_test(NAME ${name} COMMAND ${Python3_EXECUTABLE} ${ARGN})
# engine#2344 review: ctest runs a test in the BUILD directory unless told otherwise, so a python
# row whose tool defaults to `--root .` looked for CMakeLists.txt where there is none -- the
# self-test passed beside a failing check and the log said only "no CMakeLists.txt under .".
# The source tree is what these rows are about; a row that needs the build tree says so itself.
set_tests_properties(${name} PROPERTIES WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
else()
message(STATUS "ctest: not registering ${name} (no Python3 interpreter)")
endif()
Expand Down
Loading