diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5cf5c5d80ee..c3894fa0bad 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -5,12 +5,15 @@ enable_testing() function(setup_test TARGET_NAME DIR) add_executable(${TARGET_NAME} main.cpp) + include(RustLib) + target_compile_definitions(${TARGET_NAME} PUBLIC -DDEBUG_LOG) - target_link_libraries(${TARGET_NAME} PRIVATE Boost::ut ${PROJECT_NAME}_lib) + target_link_libraries(${TARGET_NAME} PRIVATE Boost::ut ${PROJECT_NAME}_lib) target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/tests/fixture PRIVATE ${CMAKE_SOURCE_DIR}/tests/${DIR}) + target_link_libraries(${TARGET_NAME} PRIVATE ${RUST_LIB_FULL_PATH}) add_test(NAME ${DIR} COMMAND ${TARGET_NAME}) - if(RUN_TESTS_AFTER_BUILD) + if (RUN_TESTS_AFTER_BUILD) add_custom_command( TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_CTEST_COMMAND} --verbose @@ -21,4 +24,4 @@ function(setup_test TARGET_NAME DIR) endfunction() add_subdirectory(unit) -add_subdirectory(integration) \ No newline at end of file +add_subdirectory(integration)