Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Eigen minimum version to 3.1 #2893

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion PCLConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
SunBlack marked this conversation as resolved.
Show resolved Hide resolved
set(EIGEN_DEFINITIONS ${EIGEN_DEFINITIONS})
endmacro()

Expand Down
14 changes: 2 additions & 12 deletions segmentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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")
Expand Down
11 changes: 4 additions & 7 deletions test/segmentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down