Skip to content

Commit bec4bf1

Browse files
authored
Merge pull request #2458 from SergioRAgostinho/pclconfig-test-targets
CMake: Do not include test targets in PCLConfig.cmake
2 parents 9f362e6 + 55fd4bc commit bec4bf1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmake/pcl_pclconfig.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ set(PCLCONFIG_SSE_COMPILE_OPTIONS ${SSE_FLAGS})
1616

1717
foreach(_ss ${PCL_SUBSYSTEMS_MODULES})
1818
PCL_GET_SUBSYS_STATUS(_status ${_ss})
19-
if(_status)
19+
20+
# do not include test targets
21+
string(REGEX MATCH "^tests_" _is_test ${_ss})
22+
23+
if(_status AND NOT _is_test)
2024
set(PCLCONFIG_AVAILABLE_COMPONENTS "${PCLCONFIG_AVAILABLE_COMPONENTS} ${_ss}")
2125
set(PCLCONFIG_AVAILABLE_COMPONENTS_LIST "${PCLCONFIG_AVAILABLE_COMPONENTS_LIST}\n# - ${_ss}")
2226
GET_IN_MAP(_deps PCL_SUBSYS_DEPS ${_ss})
@@ -68,7 +72,7 @@ foreach(_ss ${PCL_SUBSYSTEMS_MODULES})
6872
endif (_sub_status)
6973
endforeach(_sub)
7074
endif (${PCL_SUBSYS_SUBSYS})
71-
endif(_status)
75+
endif()
7276
endforeach(_ss)
7377

7478
#Boost modules

0 commit comments

Comments
 (0)