Commit 60f146cf authored by Cédric Traizet's avatar Cédric Traizet

BUG: add boost timer system and chrono to linked libraries of test using boost unit test framework

parent d7ea620c
Pipeline #2237 failed with stages
in 55 minutes and 48 seconds
......@@ -25,7 +25,10 @@ if (Boost_UNIT_TEST_FRAMEWORK_FOUND)
target_link_libraries(
otbOGRTests
${OTBGdalAdapters-Test_LIBRARIES}
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} )
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
${Boost_TIMER_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_CHRONO_LIBRARY} )
add_test(NAME coTuOGRDataSourceWrapperNew
COMMAND otbOGRTests coTuOGRDataSourceWrapperNew
......
......@@ -24,7 +24,7 @@ set(Boost_USE_MULTITHREADED ON CACHE BOOL "use multi-threaded libraries from boo
find_package (Boost 1.35.0 REQUIRED)
if (BUILD_TESTING)
find_package (Boost 1.35.0 QUIET COMPONENTS unit_test_framework)
find_package (Boost 1.35.0 QUIET COMPONENTS unit_test_framework timer system chrono)
if (NOT Boost_UNIT_TEST_FRAMEWORK_FOUND)
message(STATUS "Boost unit_test_framework not found. Hence otbOGRTests will be skipped")
else()
......
......@@ -26,20 +26,26 @@ otb_module_test()
#==== UT for utilities
if (Boost_UNIT_TEST_FRAMEWORK_FOUND)
#this test is failing on osx due to a bug in AppleClang stdc++ (Luc Hermitte)
if(NOT APPLE)
add_executable(OTBossimStringUtilitiesTest ossimStringUtilitiesTest.cpp)
target_link_libraries(OTBossimStringUtilitiesTest
otbossimplugins
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
otb_module_target_label(OTBossimStringUtilitiesTest)
otb_add_test(NAME TuossimStringUtilitiesTest COMMAND OTBossimStringUtilitiesTest )
endif()
if(NOT APPLE)
add_executable(OTBossimStringUtilitiesTest ossimStringUtilitiesTest.cpp)
target_link_libraries(OTBossimStringUtilitiesTest
otbossimplugins
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
${Boost_TIMER_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_CHRONO_LIBRARY} )
otb_module_target_label(OTBossimStringUtilitiesTest)
otb_add_test(NAME TuossimStringUtilitiesTest COMMAND OTBossimStringUtilitiesTest )
endif()
add_executable(OTBossimTimeUtilitiesTest ossimTimeUtilitiesTest.cpp)
target_link_libraries(OTBossimTimeUtilitiesTest
# ${OTBOssim_LIBRARIES}
otbossimplugins
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
${Boost_TIMER_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_CHRONO_LIBRARY} )
otb_module_target_label(OTBossimTimeUtilitiesTest)
otb_add_test(NAME TuossimTimeUtilitiesTest COMMAND OTBossimTimeUtilitiesTest )
else()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment