diff --git a/cmake/pcl_targets.cmake b/cmake/pcl_targets.cmake index 9e38cab8e5c..c942f08fe95 100644 --- a/cmake/pcl_targets.cmake +++ b/cmake/pcl_targets.cmake @@ -449,6 +449,8 @@ macro(PCL_ADD_TEST _name _exename) else(${CMAKE_VERSION} VERSION_LESS 2.8.4) add_test(NAME ${_name} COMMAND ${_exename} ${PCL_ADD_TEST_ARGUMENTS}) endif(${CMAKE_VERSION} VERSION_LESS 2.8.4) + + add_dependencies(tests ${_exename}) endmacro(PCL_ADD_TEST) ############################################################################### diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6aa645902bc..0be856728d0 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -27,6 +27,8 @@ if(build) enable_testing() include_directories(${PCL_INCLUDE_DIRS}) + add_custom_target(tests ${CMAKE_CTEST_COMMAND} -V) + add_subdirectory(2d) add_subdirectory(common) add_subdirectory(features)