File tree 3 files changed +11
-5
lines changed
3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,11 @@ else ()
91
91
include_directories (INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} /nbtp/include )
92
92
endif ()
93
93
94
+ # Test time dependencies
95
+ if (BUILD_TESTS)
96
+ find_package (Python REQUIRED COMPONENTS Interpreter)
97
+ endif ()
98
+
94
99
# Resources
95
100
add_subdirectory (misc)
96
101
Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ if (USE_GETTEXT)
46
46
target_include_directories (libminemap PUBLIC ${Intl_INCLUDE_DIRS} )
47
47
if (NOT Intl_IS_BUILT_IN)
48
48
target_link_libraries (libminemap PUBLIC ${Intl_LIBRARY} )
49
- endif ()
50
- endif ()
49
+ endif ()
50
+ endif ()
51
51
52
52
foreach (PROGRAM IN LISTS PROGRAMS)
53
53
add_executable (${PROGRAM} ${PROGRAM} .cpp)
@@ -69,11 +69,12 @@ add_subdirectory(tests)
69
69
if (BUILD_TESTS)
70
70
find_package (Python3 COMPONENTS Interpreter REQUIRED)
71
71
file (GLOB TEST_FIXURES LIST_DIRECTORIES false "${CMAKE_CURRENT_SOURCE_DIR} /../test-images/*.json" )
72
- foreach (TEST_FIXURE IN LISTS TEST_FIXURES)
72
+ foreach (TEST_FIXURE IN LISTS TEST_FIXURES)
73
73
if ("${TEST_FIXURE} " MATCHES "([^/]+)\\ .json" )
74
74
add_test (NAME "${CMAKE_MATCH_1} "
75
- COMMAND "${Python3_EXECUTABLE} " "${CMAKE_CURRENT_SOURCE_DIR} /../test-images/verify.py" "$<TARGET_FILE:minemap>" "${TEST_FIXURE} "
75
+ COMMAND "${Python3_EXECUTABLE} " "${CMAKE_CURRENT_SOURCE_DIR} /../test-images/verify.py" "$<TARGET_FILE:minemap>" "${TEST_FIXURE} "
76
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} /../test-images"
76
77
)
77
78
endif ()
78
- endforeach ()
79
+ endforeach ()
79
80
endif ()
You can’t perform that action at this time.
0 commit comments