@@ -11,10 +11,13 @@ endif()
1111
1212# check c++11 / c++0x
1313include (CheckCXXCompilerFlag)
14+ check_cxx_compiler_flag("-std=c++17" COMPILER_SUPPORTS_CXX17)
1415check_cxx_compiler_flag("-std=c++14" COMPILER_SUPPORTS_CXX14)
1516check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
1617check_cxx_compiler_flag("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
17- if (COMPILER_SUPPORTS_CXX14)
18+ if (COMPILER_SUPPORTS_CXX17)
19+ set (CMAKE_CXX_FLAGS "-std=c++17" )
20+ elseif (COMPILER_SUPPORTS_CXX14)
1821 set (CMAKE_CXX_FLAGS "-std=c++14" )
1922elseif (COMPILER_SUPPORTS_CXX11)
2023 set (CMAKE_CXX_FLAGS "-std=c++11" )
@@ -57,6 +60,7 @@ find_package(PkgConfig)
5760pkg_check_modules(ml_classifiers ml_classifiers QUIET )
5861# only run in hydro
5962find_package (PCL REQUIRED)
63+ message (STATUS "PCL_VERSION : ${PCL_VERSION} " )
6064find_package (OpenMP)
6165set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS} " )
6266set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} " )
@@ -180,8 +184,12 @@ jsk_pcl_nodelet(src/moving_least_square_smoothing_nodelet.cpp "jsk_pcl/MovingLea
180184jsk_pcl_nodelet(src/fisheye_sphere_publisher_nodelet.cpp "jsk_pcl/FisheyeSpherePublisher" "fisheye_sphere_publisher" )
181185jsk_pcl_nodelet(src/plane_supported_cuboid_estimator_nodelet.cpp
182186 "jsk_pcl/PlaneSupportedCuboidEstimator" "plane_supported_cuboid_estimator" )
187+ if (${PCL_VERSION} VERSION_LESS "1.12.0" )
188+ # Could not compile on PCL-1.12.0
189+ # undefined reference to `pcl::FilterIndices<pcl::tracking::ParticleCuboid>::applyFilter(pcl::PointCloud<pcl::tracking::ParticleCuboid>&)'
183190jsk_pcl_nodelet(src/extract_cuboid_particles_top_n_nodelet.cpp
184191 "jsk_pcl/ExtractCuboidParticlesTopN" "extract_cuboid_particles_top_n" )
192+ endif ()
185193jsk_pcl_nodelet(src/interactive_cuboid_likelihood_nodelet.cpp
186194 "jsk_pcl/InteractiveCuboidLikelihood" "interactive_cuboid_likelihood" )
187195jsk_pcl_nodelet(src/image_rotate_nodelet.cpp
@@ -577,7 +585,9 @@ if (CATKIN_ENABLE_TESTING)
577585 add_rostest(test /test_edgebased_cube_finder.test )
578586 add_rostest(test /test_environment_plane_modeling.test )
579587 add_rostest(test /test_euclidean_segmentation.test )
580- add_rostest(test /test_extract_cuboid_particles_top_n.test )
588+ if (${PCL_VERSION} VERSION_LESS "1.12.0" )
589+ add_rostest(test /test_extract_cuboid_particles_top_n.test )
590+ endif ()
581591 add_rostest(test /test_extract_top_polygon_likelihood.test )
582592 add_rostest(test /test_feature_registration.test )
583593 add_rostest(test /test_find_object_on_plane.test )
0 commit comments