From a4374a86a5ecb8bb4241c3ee171ad6ccfc2a3e07 Mon Sep 17 00:00:00 2001 From: Heiko Thiel Date: Wed, 6 Mar 2019 15:38:45 +0100 Subject: [PATCH] Bump Eigen minimum version to 3.1 --- CMakeLists.txt | 2 +- PCLConfig.cmake.in | 2 +- segmentation/CMakeLists.txt | 14 ++------------ test/segmentation/CMakeLists.txt | 11 ++++------- 4 files changed, 8 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d17148e6ae..ce65c8f527a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -281,7 +281,7 @@ else() endif() # Eigen (required) -find_package(Eigen REQUIRED) +find_package(Eigen 3.1 REQUIRED) include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS}) # FLANN (required) diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in index e17fd801a48..dd712ddbfc7 100644 --- a/PCLConfig.cmake.in +++ b/PCLConfig.cmake.in @@ -124,7 +124,7 @@ macro(find_eigen) elseif(NOT EIGEN_ROOT) get_filename_component(EIGEN_ROOT "@EIGEN_INCLUDE_DIRS@" ABSOLUTE) endif() - find_package(Eigen) + find_package(Eigen 3.1) set(EIGEN_DEFINITIONS ${EIGEN_DEFINITIONS}) endmacro() diff --git a/segmentation/CMakeLists.txt b/segmentation/CMakeLists.txt index ec47eda7d3f..73a0758731c 100644 --- a/segmentation/CMakeLists.txt +++ b/segmentation/CMakeLists.txt @@ -61,6 +61,7 @@ set(incs "include/pcl/${SUBSYS_NAME}/ground_plane_comparator.h" "include/pcl/${SUBSYS_NAME}/organized_connected_component_segmentation.h" "include/pcl/${SUBSYS_NAME}/organized_multi_plane_segmentation.h" + "include/pcl/${SUBSYS_NAME}/random_walker.h" "include/pcl/${SUBSYS_NAME}/region_3d.h" "include/pcl/${SUBSYS_NAME}/planar_region.h" "include/pcl/${SUBSYS_NAME}/planar_polygon_fusion.h" @@ -82,12 +83,6 @@ if(Boost_MAJOR_VERSION GREATER 1 OR Boost_MINOR_VERSION GREATER 43) "include/pcl/${SUBSYS_NAME}/min_cut_segmentation.h" ) endif() -# Random walker requires Eigen::Sparse module that is available since 3.1.0 -if(NOT ("${EIGEN_VERSION}" VERSION_LESS 3.1.0)) - list(APPEND incs - "include/pcl/${SUBSYS_NAME}/random_walker.h" - ) -endif() set(impl_incs "include/pcl/${SUBSYS_NAME}/impl/extract_clusters.hpp" @@ -96,6 +91,7 @@ set(impl_incs "include/pcl/${SUBSYS_NAME}/impl/sac_segmentation.hpp" "include/pcl/${SUBSYS_NAME}/impl/seeded_hue_segmentation.hpp" "include/pcl/${SUBSYS_NAME}/impl/segment_differences.hpp" + "include/pcl/${SUBSYS_NAME}/impl/random_walker.hpp" "include/pcl/${SUBSYS_NAME}/impl/region_growing.hpp" "include/pcl/${SUBSYS_NAME}/impl/region_growing_rgb.hpp" "include/pcl/${SUBSYS_NAME}/impl/organized_connected_component_segmentation.hpp" @@ -119,12 +115,6 @@ if(Boost_MAJOR_VERSION GREATER 1 OR Boost_MINOR_VERSION GREATER 43) "include/pcl/${SUBSYS_NAME}/impl/min_cut_segmentation.hpp" ) endif() -# Random walker requires Eigen::Sparse module that is available since 3.1.0 -if(NOT ("${EIGEN_VERSION}" VERSION_LESS 3.1.0)) - list(APPEND impl_incs - "include/pcl/${SUBSYS_NAME}/impl/random_walker.hpp" - ) -endif() set(LIB_NAME "pcl_${SUBSYS_NAME}") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") diff --git a/test/segmentation/CMakeLists.txt b/test/segmentation/CMakeLists.txt index e49f65d37d5..53dabcab3c2 100644 --- a/test/segmentation/CMakeLists.txt +++ b/test/segmentation/CMakeLists.txt @@ -12,13 +12,10 @@ if(NOT build) return() endif() -# Random walker requires Eigen::Sparse module that is available since 3.1.0 -if(NOT ("${EIGEN_VERSION}" VERSION_LESS 3.1.0)) - PCL_ADD_TEST(random_walker test_random_walker - FILES test_random_walker.cpp - LINK_WITH pcl_gtest - ARGUMENTS "${PCL_SOURCE_DIR}/test/segmentation/data") -endif() +PCL_ADD_TEST(random_walker test_random_walker + FILES test_random_walker.cpp + LINK_WITH pcl_gtest + ARGUMENTS "${PCL_SOURCE_DIR}/test/segmentation/data") PCL_ADD_TEST(a_segmentation_test test_segmentation FILES test_segmentation.cpp