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/2100master
parent
42b2763830
commit
4fd904d833
|
@ -104,7 +104,12 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${LUA_INCLUDE_DIR})
|
||||||
# PCL
|
# PCL
|
||||||
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${PCL_INCLUDE_DIRS})
|
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${PCL_INCLUDE_DIRS})
|
||||||
target_link_libraries(${PROJECT_NAME} PUBLIC ${PCL_LIBRARIES})
|
target_link_libraries(${PROJECT_NAME} PUBLIC ${PCL_LIBRARIES})
|
||||||
|
set(BLACKLISTED_PCL_DEFINITIONS " -march=native -msse4.2 -mfpmath=sse ")
|
||||||
foreach(DEFINITION ${PCL_DEFINITIONS})
|
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}")
|
set(TARGET_COMPILE_FLAGS "${TARGET_COMPILE_FLAGS} ${DEFINITION}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue