1
0
mirror of synced 2024-11-13 18:50:53 +01:00
ImHex/tests/CMakeLists.txt

23 lines
631 B
CMake
Raw Normal View History

2021-09-11 14:41:18 +02:00
cmake_minimum_required(VERSION 3.16)
project(tests)
# Add new tests here #
set(AVAILABLE_TESTS
Placement
)
add_executable(tests source/main.cpp )
target_include_directories(tests PRIVATE include)
target_link_libraries(tests libimhex)
set_target_properties(tests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET tests
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/test_data" ${CMAKE_BINARY_DIR})
foreach (test IN LISTS AVAILABLE_TESTS)
add_test(NAME "${test}" COMMAND tests "${test}" WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
endforeach ()