diff --git a/ddsrecorder/CMakeLists.txt b/ddsrecorder/CMakeLists.txt index 5d4ad0716..2945d4e23 100644 --- a/ddsrecorder/CMakeLists.txt +++ b/ddsrecorder/CMakeLists.txt @@ -62,9 +62,9 @@ configure_project_cpp() # Determine Fast DDS version if ("${fastrtps_VERSION}" VERSION_LESS 2.13) - set(DDS_TYPES_VERSION "/v1/") + set(DDS_TYPES_VERSION "v1") else() - set(DDS_TYPES_VERSION "/v2/") + set(DDS_TYPES_VERSION "v2") endif() file( @@ -72,8 +72,8 @@ file( "${PROJECT_SOURCE_DIR}/src/cpp/tool/*.cpp" "${PROJECT_SOURCE_DIR}/src/cpp/user_interface/*.cpp" "${PROJECT_SOURCE_DIR}/src/cpp/main.cpp" - "${PROJECT_SOURCE_DIR}/src/cpp/command_receiver/*.cpp" - "${PROJECT_SOURCE_DIR}/src/cpp/**/**${DDS_TYPES_VERSION}**/*.cxx" + "${PROJECT_SOURCE_DIR}/src/cpp/command_receiver/Command*.cpp" + "${PROJECT_SOURCE_DIR}/src/cpp/*/*/${DDS_TYPES_VERSION}/*/*.cxx" ) compile_tool( @@ -81,12 +81,7 @@ compile_tool( "${SOURCES_FILES}" ) -file(GLOB_RECURSE TEST_FILES "${PROJECT_SOURCE_DIR}/test/") -foreach(TEST_FILE ${TEST_FILES}) - if(NOT TEST_FILE MATCHES ${DDS_TYPES_VERSION}) - compile_test_tool(${TEST_FILE}) - endif() -endforeach() +compile_test_tool("${PROJECT_SOURCE_DIR}/test/") ############################################################################### # Packaging diff --git a/ddsrecorder/test/blackbox/mcap/CMakeLists.txt b/ddsrecorder/test/blackbox/mcap/CMakeLists.txt index 933a903e3..10d52cc92 100644 --- a/ddsrecorder/test/blackbox/mcap/CMakeLists.txt +++ b/ddsrecorder/test/blackbox/mcap/CMakeLists.txt @@ -25,13 +25,21 @@ else() set(DDS_TYPES_VERSION "v2") endif() +file( + GLOB_RECURSE TEST_LIBRARY_SOURCES + "${PROJECT_SOURCE_DIR}/src/cpp/tool/*.cpp" + "${PROJECT_SOURCE_DIR}/src/cpp/user_interface/*.cpp" + "${PROJECT_SOURCE_DIR}/src/cpp/command_receiver/Command*.cpp" + "${PROJECT_SOURCE_DIR}/src/cpp/*/*/${DDS_TYPES_VERSION}/*/*.cxx" + ) + set(TEST_SOURCES McapFileCreationTest.cpp ${PROJECT_SOURCE_DIR}/test/blackbox/mcap/types/${DDS_TYPES_VERSION}/hello_world/HelloWorld.cxx ${PROJECT_SOURCE_DIR}/test/blackbox/mcap/types/${DDS_TYPES_VERSION}/hello_world/HelloWorldPubSubTypes.cxx ${PROJECT_SOURCE_DIR}/test/blackbox/mcap/types/${DDS_TYPES_VERSION}/hello_world/HelloWorldTypeObject.cxx $<$:${PROJECT_SOURCE_DIR}/test/blackbox/mcap/types/v2/hello_world/HelloWorldv1.cxx> -) + ) set(TEST_LIST mcap_data_msgs @@ -75,4 +83,5 @@ add_blackbox_executable( "${TEST_LIST}" "${TEST_NEEDED_SOURCES}" "${TEST_EXTRA_HEADERS}" + "${TEST_LIBRARY_SOURCES}" )