Skip to content

Commit

Permalink
remove architecture specific definitions exported by PCL (#893)
Browse files Browse the repository at this point in the history
* remove architecture specific definitions exported by PCL

This is an issue on PCL 1.8.X causing SIGILL, Illegal instruction crashes: ros-gbp/cartographer_ros-release#10
Should be fixed in future PCL version with PointCloudLibrary/pcl#2100
  • Loading branch information
mikaelarguedas authored and gaschler committed Jun 8, 2018
1 parent c7481ab commit 3ee1db8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cartographer_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 3ee1db8

Please sign in to comment.