diff --git a/grid_map_pcl/CMakeLists.txt b/grid_map_pcl/CMakeLists.txt index 489f2adb..70c3dddf 100644 --- a/grid_map_pcl/CMakeLists.txt +++ b/grid_map_pcl/CMakeLists.txt @@ -7,6 +7,13 @@ find_package(grid_map_cmake_helpers REQUIRED) find_package(grid_map_core REQUIRED) find_package(grid_map_msgs REQUIRED) find_package(grid_map_ros REQUIRED) + +# PCL's package configuration uses upper-case *_ROOT variables for some of its +# dependencies (for example EIGEN_ROOT and FLANN_ROOT). CMake 3.27+ warns unless +# CMP0144 is selected before PCLConfig.cmake is evaluated. +if(POLICY CMP0144) + cmake_policy(SET CMP0144 NEW) +endif() find_package(PCL REQUIRED) ## See ROS REP2000 for expected PCL version find_package(rclcpp REQUIRED) find_package(rcutils REQUIRED) diff --git a/grid_map_sdf/CMakeLists.txt b/grid_map_sdf/CMakeLists.txt index 9294fb3e..23cb1741 100644 --- a/grid_map_sdf/CMakeLists.txt +++ b/grid_map_sdf/CMakeLists.txt @@ -6,6 +6,13 @@ project(grid_map_sdf) find_package(ament_cmake REQUIRED) find_package(grid_map_cmake_helpers REQUIRED) find_package(grid_map_core REQUIRED) + +# PCL's package configuration uses upper-case *_ROOT variables for some of its +# dependencies (for example EIGEN_ROOT and FLANN_ROOT). CMake 3.27+ warns unless +# CMP0144 is selected before PCLConfig.cmake is evaluated. +if(POLICY CMP0144) + cmake_policy(SET CMP0144 NEW) +endif() find_package(PCL REQUIRED COMPONENTS common) ## System dependencies are found with CMake's conventions