when using pcl do not allow it to override compiler flags

This commit is contained in:
wmayer
2019-11-22 14:46:01 +01:00
parent 875a463923
commit 9d723f38bc

View File

@@ -6,6 +6,9 @@ macro(SetupPCL)
# PCL needs to be found before boost because the PCLConfig also calls find_package(Boost ...),
# but with different components
if(FREECAD_USE_PCL)
# pcl overrides the compiler flags by adding -Wno-deprecated
set (SAVE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
find_package(PCL REQUIRED COMPONENTS common kdtree features surface io filters segmentation sample_consensus)
set (CMAKE_CXX_FLAGS ${SAVE_CXX_FLAGS})
endif(FREECAD_USE_PCL)
endmacro(SetupPCL)