From 858087675f4c84de0e076de9a507ff4651d54b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Agostinho?= Date: Tue, 25 Sep 2018 16:26:13 +0200 Subject: [PATCH] CMake: Do not include test targets in PCLConfig.cmake. --- cmake/pcl_pclconfig.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/pcl_pclconfig.cmake b/cmake/pcl_pclconfig.cmake index 152be7582db..b0308624164 100644 --- a/cmake/pcl_pclconfig.cmake +++ b/cmake/pcl_pclconfig.cmake @@ -16,7 +16,11 @@ set(PCLCONFIG_SSE_COMPILE_OPTIONS ${SSE_FLAGS}) foreach(_ss ${PCL_SUBSYSTEMS_MODULES}) PCL_GET_SUBSYS_STATUS(_status ${_ss}) - if(_status) + + # do not include test targets + string(REGEX REPLACE "tests_(.+)" "" _ss ${_ss}) + + if(_status AND _ss) set(PCLCONFIG_AVAILABLE_COMPONENTS "${PCLCONFIG_AVAILABLE_COMPONENTS} ${_ss}") set(PCLCONFIG_AVAILABLE_COMPONENTS_LIST "${PCLCONFIG_AVAILABLE_COMPONENTS_LIST}\n# - ${_ss}") GET_IN_MAP(_deps PCL_SUBSYS_DEPS ${_ss}) @@ -68,7 +72,7 @@ foreach(_ss ${PCL_SUBSYSTEMS_MODULES}) endif (_sub_status) endforeach(_sub) endif (${PCL_SUBSYS_SUBSYS}) - endif(_status) + endif() endforeach(_ss) #Boost modules