From 4ef147f2d0c5f78edcc54fa9f050dd01c688218b Mon Sep 17 00:00:00 2001 From: Manuel Grizonnet <manuel.grizonnet@cnes.fr> Date: Tue, 20 Nov 2018 16:29:28 +0100 Subject: [PATCH] ENH: remove non mandatory add_dependencies for header tests to avoid non-existent dependency --- CMake/OTBModuleHeaderTest.cmake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMake/OTBModuleHeaderTest.cmake b/CMake/OTBModuleHeaderTest.cmake index 1b01c7e82e..bcfc52dc22 100644 --- a/CMake/OTBModuleHeaderTest.cmake +++ b/CMake/OTBModuleHeaderTest.cmake @@ -131,13 +131,11 @@ macro( otb_module_headertest _name ) ) add_executable( ${_test_name} ${_header_test_src} ) target_link_libraries( ${_test_name} OTBCommon ) + if (${_name}_LIBRARIES) - # OTBBoostAdapters depends only on OTBBoost, - # and OTBBoost_LIBRARIES can be empty, so check for it - add_dependencies(${_test_name} ${${_name}_LIBRARIES}) - # this target_link should be needed only on WIN32 target_link_libraries(${_test_name} ${${_name}_LIBRARIES}) endif() + add_dependencies(${_name}-all ${_test_name}) math( EXPR _test_num "${_test_num} + 1" ) endforeach() -- GitLab