From 1371c78223fcd844b2f18fe16c971ba7f850b116 Mon Sep 17 00:00:00 2001 From: Markus Vieth <39675748+mvieth@users.noreply.github.com> Date: Wed, 21 Apr 2021 13:39:48 +0200 Subject: [PATCH] Suppress cmake warnings for pcl modules (#4431) * Suppress cmake warnings for mismatched names --- PCLConfig.cmake.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in index 797f6d2b25c..43ca25b2e9a 100644 --- a/PCLConfig.cmake.in +++ b/PCLConfig.cmake.in @@ -637,7 +637,8 @@ foreach(component ${PCL_TO_FIND_COMPONENTS}) else(PCL_${COMPONENT}_INCLUDE_DIR) #pcl_message("No include directory found for pcl_${component}.") endif(PCL_${COMPONENT}_INCLUDE_DIR) - + + set(FPHSA_NAME_MISMATCHED 1) # Suppress warnings, see https://cmake.org/cmake/help/v3.17/module/FindPackageHandleStandardArgs.html # Skip find_library for header only modules list(FIND pcl_header_only_components ${component} _is_header_only) if(_is_header_only EQUAL -1) @@ -671,7 +672,8 @@ foreach(component ${PCL_TO_FIND_COMPONENTS}) find_package_handle_standard_args(PCL_${COMPONENT} DEFAULT_MSG PCL_${COMPONENT}_INCLUDE_DIR) endif(_is_header_only EQUAL -1) - + unset(FPHSA_NAME_MISMATCHED) + if(PCL_${COMPONENT}_FOUND) if(NOT "${PCL_${COMPONENT}_INCLUDE_DIRS}" STREQUAL "") list(REMOVE_DUPLICATES PCL_${COMPONENT}_INCLUDE_DIRS)