@@ -18,31 +18,36 @@ ament_add_gtest(${PROJECT_NAME}_utest utest.cpp)
18
18
if (TARGET ${PROJECT_NAME} _utest )
19
19
target_include_directories (${PROJECT_NAME} _utest
20
20
PUBLIC "../include" ${console_bridge_INCLUDE_DIRS} ${Poco_INCLUDE_DIRS} )
21
- target_link_libraries (${PROJECT_NAME} _utest ${PROJECT_NAME} ${Poco_LIBRARIES} )
21
+ target_link_libraries (${PROJECT_NAME} _utest
22
+ ${PROJECT_NAME}
23
+ ${PROJECT_NAME} _TestPlugins1
24
+ ${PROJECT_NAME} _TestPlugins2
25
+ ${Poco_LIBRARIES}
26
+ )
22
27
if (NOT WIN32 )
23
28
target_link_libraries (${PROJECT_NAME} _utest pthread )
24
29
endif ()
25
- add_dependencies (${PROJECT_NAME} _utest ${PROJECT_NAME} _TestPlugins1 ${PROJECT_NAME} _TestPlugins2 )
26
30
endif ()
27
31
28
32
include (CheckCXXCompilerFlag )
29
33
CHECK_CXX_COMPILER_FLAG ("-std=c++11" COMPILER_SUPPORTS_CXX11 )
30
34
if (COMPILER_SUPPORTS_CXX11 )
31
- catkin_add_gtest (${PROJECT_NAME} _unique_ptr_test unique_ptr_test.cpp )
35
+ find_package (Boost REQUIRED COMPONENTS thread )
36
+ ament_add_gtest (${PROJECT_NAME} _unique_ptr_test unique_ptr_test.cpp )
32
37
if (TARGET ${PROJECT_NAME} _unique_ptr_test )
38
+ target_include_directories (${PROJECT_NAME} _unique_ptr_test
39
+ PUBLIC "../include" ${Boost_INCLUDE_DIRS} )
33
40
target_link_libraries (${PROJECT_NAME} _unique_ptr_test
34
41
${Boost_LIBRARIES}
35
- ${class_loader_LIBRARIES}
42
+ ${PROJECT_NAME}
43
+ ${PROJECT_NAME} _TestPlugins1
44
+ ${PROJECT_NAME} _TestPlugins2
36
45
)
37
46
set_target_properties (${PROJECT_NAME} _unique_ptr_test
38
47
PROPERTIES
39
48
COMPILE_FLAGS -std=c++11
40
49
LINK_FLAGS -std=c++11
41
50
)
42
- add_dependencies (${PROJECT_NAME} _unique_ptr_test
43
- ${PROJECT_NAME} _TestPlugins1
44
- ${PROJECT_NAME} _TestPlugins2
45
- )
46
51
endif ()
47
52
endif ()
48
53
0 commit comments