From 9d723f38bce66b9fa6d5e26d089b0a4777a7bb8d Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 22 Nov 2019 14:46:01 +0100 Subject: [PATCH] when using pcl do not allow it to override compiler flags --- cMake/FreeCAD_Helpers/SetupPCL.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cMake/FreeCAD_Helpers/SetupPCL.cmake b/cMake/FreeCAD_Helpers/SetupPCL.cmake index f3387bae0c..844f1dfb10 100644 --- a/cMake/FreeCAD_Helpers/SetupPCL.cmake +++ b/cMake/FreeCAD_Helpers/SetupPCL.cmake @@ -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)