From 4fd904d8332fc3b120cade357ae84905a079e0d1 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Thu, 7 Jun 2018 22:00:15 +0200 Subject: [PATCH] remove architecture specific definitions exported by PCL (#893) * remove architecture specific definitions exported by PCL This is an issue on PCL 1.8.X causing SIGILL, Illegal instruction crashes: https://github.com/ros-gbp/cartographer_ros-release/issues/10 Should be fixed in future PCL version with https://github.com/PointCloudLibrary/pcl/pull/2100 --- cartographer_ros/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cartographer_ros/CMakeLists.txt b/cartographer_ros/CMakeLists.txt index dd2f2af..e8590a4 100644 --- a/cartographer_ros/CMakeLists.txt +++ b/cartographer_ros/CMakeLists.txt @@ -104,7 +104,12 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${LUA_INCLUDE_DIR}) # PCL target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${PCL_INCLUDE_DIRS}) target_link_libraries(${PROJECT_NAME} PUBLIC ${PCL_LIBRARIES}) +set(BLACKLISTED_PCL_DEFINITIONS " -march=native -msse4.2 -mfpmath=sse ") foreach(DEFINITION ${PCL_DEFINITIONS}) + list (FIND BLACKLISTED_PCL_DEFINITIONS "${DEFINITION}" DEFINITIONS_INDEX) + if (${DEFINITIONS_INDEX} GREATER -1) + continue() + endif() set(TARGET_COMPILE_FLAGS "${TARGET_COMPILE_FLAGS} ${DEFINITION}") endforeach()