Skip to content

Commit

Permalink
[ros-o] jsk_pcl_ros/CMakeLists.txt, support c++17, skip src/extract_c…
Browse files Browse the repository at this point in the history
…uboid_particles_top_n_nodelet.cpp, due to undefined reference to 'pcl::FilterIndices<pcl::tracking::ParticleCuboid>::applyFilter(pcl::PointCloud<pcl::tracking::ParticleCuboid>&)'
  • Loading branch information
k-okada committed Dec 27, 2024
1 parent 6d7fc06 commit 93e11f8
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions jsk_pcl_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ endif()

# check c++11 / c++0x
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++17" COMPILER_SUPPORTS_CXX17)
check_cxx_compiler_flag("-std=c++14" COMPILER_SUPPORTS_CXX14)
check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
check_cxx_compiler_flag("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX14)
if(COMPILER_SUPPORTS_CXX17)
set(CMAKE_CXX_FLAGS "-std=c++17")
elseif(COMPILER_SUPPORTS_CXX14)
set(CMAKE_CXX_FLAGS "-std=c++14")
elseif(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "-std=c++11")
Expand Down Expand Up @@ -57,6 +60,7 @@ find_package(PkgConfig)
pkg_check_modules(ml_classifiers ml_classifiers QUIET)
# only run in hydro
find_package(PCL REQUIRED)
message(STATUS "PCL_VERSION : ${PCL_VERSION}")
find_package(OpenMP)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
Expand Down Expand Up @@ -180,8 +184,12 @@ jsk_pcl_nodelet(src/moving_least_square_smoothing_nodelet.cpp "jsk_pcl/MovingLea
jsk_pcl_nodelet(src/fisheye_sphere_publisher_nodelet.cpp "jsk_pcl/FisheyeSpherePublisher" "fisheye_sphere_publisher")
jsk_pcl_nodelet(src/plane_supported_cuboid_estimator_nodelet.cpp
"jsk_pcl/PlaneSupportedCuboidEstimator" "plane_supported_cuboid_estimator")
if(${PCL_VERSION} VERSION_LESS "1.12.0")
# Could not compile on PCL-1.12.0
# undefined reference to `pcl::FilterIndices<pcl::tracking::ParticleCuboid>::applyFilter(pcl::PointCloud<pcl::tracking::ParticleCuboid>&)'
jsk_pcl_nodelet(src/extract_cuboid_particles_top_n_nodelet.cpp
"jsk_pcl/ExtractCuboidParticlesTopN" "extract_cuboid_particles_top_n")
endif()
jsk_pcl_nodelet(src/interactive_cuboid_likelihood_nodelet.cpp
"jsk_pcl/InteractiveCuboidLikelihood" "interactive_cuboid_likelihood")
jsk_pcl_nodelet(src/image_rotate_nodelet.cpp
Expand Down Expand Up @@ -577,7 +585,9 @@ if (CATKIN_ENABLE_TESTING)
add_rostest(test/test_edgebased_cube_finder.test)
add_rostest(test/test_environment_plane_modeling.test)
add_rostest(test/test_euclidean_segmentation.test)
add_rostest(test/test_extract_cuboid_particles_top_n.test)
if(${PCL_VERSION} VERSION_LESS "1.12.0")
add_rostest(test/test_extract_cuboid_particles_top_n.test)
endif()
add_rostest(test/test_extract_top_polygon_likelihood.test)
add_rostest(test/test_feature_registration.test)
add_rostest(test/test_find_object_on_plane.test)
Expand Down

0 comments on commit 93e11f8

Please sign in to comment.