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
master
Mikael Arguedas 2018-06-07 22:00:15 +02:00 committed by Christoph Schütte
parent 42b2763830
commit 4fd904d833
1 changed files with 5 additions and 0 deletions

View File

@ -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()