test: add cross-module tests
This commit is contained in:
@@ -46,3 +46,17 @@ foreach (module ${b_modules})
|
||||
endforeach (test_file)
|
||||
endif ()
|
||||
endforeach (module)
|
||||
|
||||
file(GLOB test_sources test/*.c)
|
||||
list(REMOVE_ITEM test_sources "${CMAKE_CURRENT_SOURCE_DIR}/test/units.c")
|
||||
|
||||
foreach (test_file ${test_sources})
|
||||
get_filename_component(test_name ${test_file} NAME_WE)
|
||||
add_executable(blue-${test_name} ${test_file})
|
||||
|
||||
set_target_properties(blue-${test_name} PROPERTIES FOLDER "Tests")
|
||||
|
||||
foreach (module ${b_modules})
|
||||
target_link_libraries(blue-${test_name} blue-${module})
|
||||
endforeach (module)
|
||||
endforeach (test_file)
|
||||
|
||||
Reference in New Issue
Block a user