@@ -3,40 +3,16 @@ find_package(ament_cmake_gtest REQUIRED)
33include ("../cmake/class_loader_hide_library_symbols.cmake" )
44
55add_library (${PROJECT_NAME} _TestPlugins1 EXCLUDE_FROM_ALL SHARED plugins1.cpp)
6- if (ament_cmake_FOUND)
7- target_include_directories (${PROJECT_NAME} _TestPlugins1
8- PUBLIC "../include" )
9- ament_target_dependencies(${PROJECT_NAME} _TestPlugins1 "console_bridge" )
10- else ()
11- target_include_directories (${PROJECT_NAME} _TestPlugins1
12- PUBLIC "../include" ${console_bridge_INCLUDE_DIRS} )
13- endif ()
146target_link_libraries (${PROJECT_NAME} _TestPlugins1 ${PROJECT_NAME} )
157class_loader_hide_library_symbols(${PROJECT_NAME} _TestPlugins1)
168
179add_library (${PROJECT_NAME} _TestPlugins2 EXCLUDE_FROM_ALL SHARED plugins2.cpp)
18- if (ament_cmake_FOUND)
19- target_include_directories (${PROJECT_NAME} _TestPlugins2
20- PUBLIC "../include" )
21- ament_target_dependencies(${PROJECT_NAME} _TestPlugins2 "console_bridge" )
22- else ()
23- target_include_directories (${PROJECT_NAME} _TestPlugins2
24- PUBLIC "../include" ${console_bridge_INCLUDE_DIRS} )
25- endif ()
2610target_link_libraries (${PROJECT_NAME} _TestPlugins2 ${PROJECT_NAME} )
2711class_loader_hide_library_symbols(${PROJECT_NAME} _TestPlugins2)
2812
2913# These plugins are loaded using dlopen() with RTLD_GLOBAL in utest and may cause side effects
3014# in other tests if they are used elsewhere.
3115add_library (${PROJECT_NAME} _TestGlobalPlugins EXCLUDE_FROM_ALL SHARED global_plugins.cpp)
32- if (ament_cmake_FOUND)
33- target_include_directories (${PROJECT_NAME} _TestGlobalPlugins
34- PUBLIC "../include" )
35- ament_target_dependencies(${PROJECT_NAME} _TestGlobalPlugins "console_bridge" )
36- else ()
37- target_include_directories (${PROJECT_NAME} _TestGlobalPlugins
38- PUBLIC "../include" ${console_bridge_INCLUDE_DIRS} )
39- endif ()
4016target_link_libraries (${PROJECT_NAME} _TestGlobalPlugins ${PROJECT_NAME} )
4117class_loader_hide_library_symbols(${PROJECT_NAME} _TestGlobalPlugins)
4218
@@ -51,15 +27,6 @@ ament_add_gtest(${PROJECT_NAME}_utest utest.cpp
5127)
5228
5329if (TARGET ${PROJECT_NAME} _utest)
54- if (ament_cmake_FOUND)
55- target_include_directories (${PROJECT_NAME} _utest
56- PUBLIC "../include" )
57- ament_target_dependencies(${PROJECT_NAME} _utest "console_bridge" )
58- else ()
59- target_include_directories (${PROJECT_NAME} _utest
60- PUBLIC "../include" ${console_bridge_INCLUDE_DIRS} )
61- target_link_libraries (${PROJECT_NAME} _utest)
62- endif ()
6330 target_link_libraries (${PROJECT_NAME} _utest ${PROJECT_NAME} )
6431 if (NOT WIN32 )
6532 target_link_libraries (${PROJECT_NAME} _utest pthread)
@@ -74,15 +41,6 @@ ament_add_gtest(${PROJECT_NAME}_unique_ptr_test unique_ptr_test.cpp
7441 APPEND_LIBRARY_DIRS "${append_library_dirs} "
7542)
7643if (TARGET ${PROJECT_NAME} _unique_ptr_test)
77- if (ament_cmake_FOUND)
78- target_include_directories (${PROJECT_NAME} _unique_ptr_test
79- PUBLIC "../include" )
80- ament_target_dependencies(${PROJECT_NAME} _unique_ptr_test)
81- else ()
82- target_include_directories (${PROJECT_NAME} _unique_ptr_test
83- PUBLIC "../include" )
84- target_link_libraries (${PROJECT_NAME} _unique_ptr_test)
85- endif ()
8644 target_link_libraries (${PROJECT_NAME} _unique_ptr_test ${PROJECT_NAME} )
8745 if (NOT WIN32 )
8846 target_link_libraries (${PROJECT_NAME} _unique_ptr_test pthread)
0 commit comments