From 59724846e30c3e6e228b5954ec30779566aec8cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sun, 21 Sep 2025 15:59:38 +0200 Subject: [PATCH 01/17] Assembly: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- src/Mod/Assembly/App/AppAssembly.cpp | 1 - src/Mod/Assembly/App/AppAssemblyPy.cpp | 1 - src/Mod/Assembly/App/AssemblyLink.cpp | 4 +-- src/Mod/Assembly/App/AssemblyLinkPyImp.cpp | 2 -- src/Mod/Assembly/App/AssemblyObject.cpp | 4 +-- src/Mod/Assembly/App/AssemblyObjectPyImp.cpp | 2 -- src/Mod/Assembly/App/AssemblyUtils.cpp | 4 +-- src/Mod/Assembly/App/BomGroup.cpp | 4 --- src/Mod/Assembly/App/BomGroupPyImp.cpp | 2 -- src/Mod/Assembly/App/BomObject.cpp | 4 +-- src/Mod/Assembly/App/BomObjectPyImp.cpp | 2 -- src/Mod/Assembly/App/CMakeLists.txt | 7 +++--- src/Mod/Assembly/App/JointGroup.cpp | 3 --- src/Mod/Assembly/App/JointGroupPyImp.cpp | 2 -- src/Mod/Assembly/App/PreCompiled.cpp | 25 ------------------- src/Mod/Assembly/App/PreCompiled.h | 3 --- src/Mod/Assembly/App/SimulationGroup.cpp | 3 --- src/Mod/Assembly/App/SimulationGroupPyImp.cpp | 2 -- src/Mod/Assembly/App/ViewGroup.cpp | 3 --- src/Mod/Assembly/App/ViewGroupPyImp.cpp | 2 -- src/Mod/Assembly/Gui/AppAssemblyGui.cpp | 1 - src/Mod/Assembly/Gui/AppAssemblyGuiPy.cpp | 1 - src/Mod/Assembly/Gui/CMakeLists.txt | 13 +++++----- src/Mod/Assembly/Gui/PreCompiled.cpp | 25 ------------------- src/Mod/Assembly/Gui/PreCompiled.h | 2 -- src/Mod/Assembly/Gui/TaskAssemblyMessages.cpp | 4 --- src/Mod/Assembly/Gui/ViewProviderAssembly.cpp | 4 +-- .../Assembly/Gui/ViewProviderAssemblyLink.cpp | 4 +-- .../Gui/ViewProviderAssemblyPyImp.cpp | 1 - src/Mod/Assembly/Gui/ViewProviderBom.cpp | 4 +-- src/Mod/Assembly/Gui/ViewProviderBomGroup.cpp | 5 ---- .../Assembly/Gui/ViewProviderJointGroup.cpp | 5 ---- .../Gui/ViewProviderSimulationGroup.cpp | 5 ---- .../Assembly/Gui/ViewProviderViewGroup.cpp | 5 ---- 34 files changed, 16 insertions(+), 143 deletions(-) delete mode 100644 src/Mod/Assembly/App/PreCompiled.cpp delete mode 100644 src/Mod/Assembly/Gui/PreCompiled.cpp diff --git a/src/Mod/Assembly/App/AppAssembly.cpp b/src/Mod/Assembly/App/AppAssembly.cpp index 562221a891..118e18f029 100644 --- a/src/Mod/Assembly/App/AppAssembly.cpp +++ b/src/Mod/Assembly/App/AppAssembly.cpp @@ -21,7 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Assembly/App/AppAssemblyPy.cpp b/src/Mod/Assembly/App/AppAssemblyPy.cpp index f62cf30c8f..49c9bab95d 100644 --- a/src/Mod/Assembly/App/AppAssemblyPy.cpp +++ b/src/Mod/Assembly/App/AppAssemblyPy.cpp @@ -21,7 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Assembly/App/AssemblyLink.cpp b/src/Mod/Assembly/App/AssemblyLink.cpp index f12169669c..4ab6771da8 100644 --- a/src/Mod/Assembly/App/AssemblyLink.cpp +++ b/src/Mod/Assembly/App/AssemblyLink.cpp @@ -21,11 +21,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/Assembly/App/AssemblyLinkPyImp.cpp b/src/Mod/Assembly/App/AssemblyLinkPyImp.cpp index 5d9a9e78c7..7ca17b4e3b 100644 --- a/src/Mod/Assembly/App/AssemblyLinkPyImp.cpp +++ b/src/Mod/Assembly/App/AssemblyLinkPyImp.cpp @@ -22,8 +22,6 @@ ***************************************************************************/ -#include "PreCompiled.h" - // inclusion of the generated files (generated out of AssemblyLink.xml) #include "AssemblyLinkPy.h" #include "AssemblyLinkPy.cpp" diff --git a/src/Mod/Assembly/App/AssemblyObject.cpp b/src/Mod/Assembly/App/AssemblyObject.cpp index 3be6e90d9c..b9304f4e4e 100644 --- a/src/Mod/Assembly/App/AssemblyObject.cpp +++ b/src/Mod/Assembly/App/AssemblyObject.cpp @@ -21,13 +21,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include -#endif + #include #include diff --git a/src/Mod/Assembly/App/AssemblyObjectPyImp.cpp b/src/Mod/Assembly/App/AssemblyObjectPyImp.cpp index 74b6bc5f8f..4e44a9e8ea 100644 --- a/src/Mod/Assembly/App/AssemblyObjectPyImp.cpp +++ b/src/Mod/Assembly/App/AssemblyObjectPyImp.cpp @@ -22,8 +22,6 @@ ***************************************************************************/ -#include "PreCompiled.h" - // inclusion of the generated files (generated out of AssemblyObject.xml) #include "AssemblyObjectPy.h" #include "AssemblyObjectPy.cpp" diff --git a/src/Mod/Assembly/App/AssemblyUtils.cpp b/src/Mod/Assembly/App/AssemblyUtils.cpp index d55156c13e..86786484b3 100644 --- a/src/Mod/Assembly/App/AssemblyUtils.cpp +++ b/src/Mod/Assembly/App/AssemblyUtils.cpp @@ -21,8 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -30,7 +28,7 @@ #include #include #include -#endif + #include #include diff --git a/src/Mod/Assembly/App/BomGroup.cpp b/src/Mod/Assembly/App/BomGroup.cpp index 7754c39f6d..1ab091583a 100644 --- a/src/Mod/Assembly/App/BomGroup.cpp +++ b/src/Mod/Assembly/App/BomGroup.cpp @@ -21,10 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ -#endif - #include #include #include diff --git a/src/Mod/Assembly/App/BomGroupPyImp.cpp b/src/Mod/Assembly/App/BomGroupPyImp.cpp index a73a733cf7..4c22736390 100644 --- a/src/Mod/Assembly/App/BomGroupPyImp.cpp +++ b/src/Mod/Assembly/App/BomGroupPyImp.cpp @@ -21,8 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" - // inclusion of the generated files (generated out of BomGroup.xml) #include "BomGroupPy.h" #include "BomGroupPy.cpp" diff --git a/src/Mod/Assembly/App/BomObject.cpp b/src/Mod/Assembly/App/BomObject.cpp index 3a63fd52e0..ca9b8c1679 100644 --- a/src/Mod/Assembly/App/BomObject.cpp +++ b/src/Mod/Assembly/App/BomObject.cpp @@ -21,11 +21,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/Assembly/App/BomObjectPyImp.cpp b/src/Mod/Assembly/App/BomObjectPyImp.cpp index 3df251f35e..4066df238f 100644 --- a/src/Mod/Assembly/App/BomObjectPyImp.cpp +++ b/src/Mod/Assembly/App/BomObjectPyImp.cpp @@ -21,8 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" - // inclusion of the generated files (generated out of BomObject.xml) #include "BomObjectPy.h" #include "BomObjectPy.cpp" diff --git a/src/Mod/Assembly/App/CMakeLists.txt b/src/Mod/Assembly/App/CMakeLists.txt index f6696ad805..70c8e0f9d3 100644 --- a/src/Mod/Assembly/App/CMakeLists.txt +++ b/src/Mod/Assembly/App/CMakeLists.txt @@ -37,7 +37,6 @@ SOURCE_GROUP("Python" FILES ${Python_SRCS}) SET(Module_SRCS AppAssembly.cpp AppAssemblyPy.cpp - PreCompiled.cpp PreCompiled.h ) SOURCE_GROUP("Module" FILES ${Module_SRCS}) @@ -78,9 +77,9 @@ if (FREECAD_WARN_ERROR) endif() if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${Assembly_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(Assembly PreCompiled.h PreCompiled.cpp PCH_SRCS) + target_precompile_headers(Assembly PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) endif(FREECAD_USE_PCH) SET_BIN_DIR(Assembly AssemblyApp /Mod/Assembly) diff --git a/src/Mod/Assembly/App/JointGroup.cpp b/src/Mod/Assembly/App/JointGroup.cpp index c22bbbdd33..18e7c26679 100644 --- a/src/Mod/Assembly/App/JointGroup.cpp +++ b/src/Mod/Assembly/App/JointGroup.cpp @@ -21,9 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ -#endif #include #include diff --git a/src/Mod/Assembly/App/JointGroupPyImp.cpp b/src/Mod/Assembly/App/JointGroupPyImp.cpp index a403ca4d9a..2d23645b04 100644 --- a/src/Mod/Assembly/App/JointGroupPyImp.cpp +++ b/src/Mod/Assembly/App/JointGroupPyImp.cpp @@ -21,8 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" - // inclusion of the generated files (generated out of JointGroup.xml) #include "JointGroupPy.h" #include "JointGroupPy.cpp" diff --git a/src/Mod/Assembly/App/PreCompiled.cpp b/src/Mod/Assembly/App/PreCompiled.cpp deleted file mode 100644 index ed7cfc6869..0000000000 --- a/src/Mod/Assembly/App/PreCompiled.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later -/**************************************************************************** - * * - * Copyright (c) 2023 Ondsel * - * * - * This file is part of FreeCAD. * - * * - * FreeCAD is free software: you can redistribute it and/or modify it * - * under the terms of the GNU Lesser General Public License as * - * published by the Free Software Foundation, either version 2.1 of the * - * License, or (at your option) any later version. * - * * - * FreeCAD is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with FreeCAD. If not, see * - * . * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" diff --git a/src/Mod/Assembly/App/PreCompiled.h b/src/Mod/Assembly/App/PreCompiled.h index 5027472fb0..7d20eaf595 100644 --- a/src/Mod/Assembly/App/PreCompiled.h +++ b/src/Mod/Assembly/App/PreCompiled.h @@ -26,8 +26,6 @@ #include -#ifdef _PreComp_ - // standard #include #include @@ -48,5 +46,4 @@ #include #include -#endif // _PreComp_ #endif // ASSEMBLY_PRECOMPILED_H diff --git a/src/Mod/Assembly/App/SimulationGroup.cpp b/src/Mod/Assembly/App/SimulationGroup.cpp index d80197a414..71f1c574b2 100644 --- a/src/Mod/Assembly/App/SimulationGroup.cpp +++ b/src/Mod/Assembly/App/SimulationGroup.cpp @@ -21,9 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ -#endif #include #include diff --git a/src/Mod/Assembly/App/SimulationGroupPyImp.cpp b/src/Mod/Assembly/App/SimulationGroupPyImp.cpp index 1d08082cb8..4ef1c6d111 100644 --- a/src/Mod/Assembly/App/SimulationGroupPyImp.cpp +++ b/src/Mod/Assembly/App/SimulationGroupPyImp.cpp @@ -22,8 +22,6 @@ ***************************************************************************/ -#include "PreCompiled.h" - // inclusion of the generated files (generated out of SimulationGroup.xml) #include "SimulationGroupPy.h" #include "SimulationGroupPy.cpp" diff --git a/src/Mod/Assembly/App/ViewGroup.cpp b/src/Mod/Assembly/App/ViewGroup.cpp index 864e692a62..536bce8604 100644 --- a/src/Mod/Assembly/App/ViewGroup.cpp +++ b/src/Mod/Assembly/App/ViewGroup.cpp @@ -21,9 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ -#endif #include #include diff --git a/src/Mod/Assembly/App/ViewGroupPyImp.cpp b/src/Mod/Assembly/App/ViewGroupPyImp.cpp index aa86e9d416..5fda15ecc4 100644 --- a/src/Mod/Assembly/App/ViewGroupPyImp.cpp +++ b/src/Mod/Assembly/App/ViewGroupPyImp.cpp @@ -21,8 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" - // inclusion of the generated files (generated out of ViewGroup.xml) #include "ViewGroupPy.h" #include "ViewGroupPy.cpp" diff --git a/src/Mod/Assembly/Gui/AppAssemblyGui.cpp b/src/Mod/Assembly/Gui/AppAssemblyGui.cpp index eb0e09c932..4966c27bf6 100644 --- a/src/Mod/Assembly/Gui/AppAssemblyGui.cpp +++ b/src/Mod/Assembly/Gui/AppAssemblyGui.cpp @@ -21,7 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Assembly/Gui/AppAssemblyGuiPy.cpp b/src/Mod/Assembly/Gui/AppAssemblyGuiPy.cpp index dd6f0fdf22..f82ca2409a 100644 --- a/src/Mod/Assembly/Gui/AppAssemblyGuiPy.cpp +++ b/src/Mod/Assembly/Gui/AppAssemblyGuiPy.cpp @@ -21,7 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/Assembly/Gui/CMakeLists.txt b/src/Mod/Assembly/Gui/CMakeLists.txt index bcb51c20c2..541a6959a9 100644 --- a/src/Mod/Assembly/Gui/CMakeLists.txt +++ b/src/Mod/Assembly/Gui/CMakeLists.txt @@ -38,7 +38,6 @@ SOURCE_GROUP("Python" FILES ${Python_SRCS}) SET(AssemblyGui_SRCS_Module AppAssemblyGui.cpp AppAssemblyGuiPy.cpp - PreCompiled.cpp PreCompiled.h TaskAssemblyMessages.cpp TaskAssemblyMessages.h @@ -69,18 +68,18 @@ SET(AssemblyGui_SRCS ${Python_SRCS} ) -if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${AssemblyGui_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(AssemblyGui PreCompiled.h PreCompiled.cpp PCH_SRCS) -endif(FREECAD_USE_PCH) - SET(AssemblyGuiIcon_SVG Resources/icons/AssemblyWorkbench.svg ) add_library(AssemblyGui SHARED ${AssemblyGui_SRCS} ${AssemblyGuiIcon_SVG}) +if(FREECAD_USE_PCH) + target_precompile_headers(AssemblyGui PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_include_directories( AssemblyGui PRIVATE diff --git a/src/Mod/Assembly/Gui/PreCompiled.cpp b/src/Mod/Assembly/Gui/PreCompiled.cpp deleted file mode 100644 index ed7cfc6869..0000000000 --- a/src/Mod/Assembly/Gui/PreCompiled.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: LGPL-2.1-or-later -/**************************************************************************** - * * - * Copyright (c) 2023 Ondsel * - * * - * This file is part of FreeCAD. * - * * - * FreeCAD is free software: you can redistribute it and/or modify it * - * under the terms of the GNU Lesser General Public License as * - * published by the Free Software Foundation, either version 2.1 of the * - * License, or (at your option) any later version. * - * * - * FreeCAD is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with FreeCAD. If not, see * - * . * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" diff --git a/src/Mod/Assembly/Gui/PreCompiled.h b/src/Mod/Assembly/Gui/PreCompiled.h index 59d045527d..90b02a0fdd 100644 --- a/src/Mod/Assembly/Gui/PreCompiled.h +++ b/src/Mod/Assembly/Gui/PreCompiled.h @@ -26,7 +26,6 @@ #include -#ifdef _PreComp_ // STL #include @@ -48,6 +47,5 @@ // all of Inventor #include -#endif //_PreComp_ #endif // ASSEMBLYGUI_PRECOMPILED_H diff --git a/src/Mod/Assembly/Gui/TaskAssemblyMessages.cpp b/src/Mod/Assembly/Gui/TaskAssemblyMessages.cpp index a85ed0e0e0..6d3da0ae38 100644 --- a/src/Mod/Assembly/Gui/TaskAssemblyMessages.cpp +++ b/src/Mod/Assembly/Gui/TaskAssemblyMessages.cpp @@ -21,10 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ -#endif - #include #include #include diff --git a/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp b/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp index 66b83809f7..3ef1cf7cb3 100644 --- a/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp +++ b/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp @@ -21,9 +21,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -38,7 +36,7 @@ #include #include #include -#endif + #include diff --git a/src/Mod/Assembly/Gui/ViewProviderAssemblyLink.cpp b/src/Mod/Assembly/Gui/ViewProviderAssemblyLink.cpp index 04f8ff311a..becbf84f56 100644 --- a/src/Mod/Assembly/Gui/ViewProviderAssemblyLink.cpp +++ b/src/Mod/Assembly/Gui/ViewProviderAssemblyLink.cpp @@ -21,15 +21,13 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include #include -#endif + #include #include diff --git a/src/Mod/Assembly/Gui/ViewProviderAssemblyPyImp.cpp b/src/Mod/Assembly/Gui/ViewProviderAssemblyPyImp.cpp index 463be2e9ea..0ebd0ff52c 100644 --- a/src/Mod/Assembly/Gui/ViewProviderAssemblyPyImp.cpp +++ b/src/Mod/Assembly/Gui/ViewProviderAssemblyPyImp.cpp @@ -20,7 +20,6 @@ * * **************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Assembly/Gui/ViewProviderBom.cpp b/src/Mod/Assembly/Gui/ViewProviderBom.cpp index ee2146ad8f..f0e47f13e2 100644 --- a/src/Mod/Assembly/Gui/ViewProviderBom.cpp +++ b/src/Mod/Assembly/Gui/ViewProviderBom.cpp @@ -21,11 +21,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Assembly/Gui/ViewProviderBomGroup.cpp b/src/Mod/Assembly/Gui/ViewProviderBomGroup.cpp index 980426cc11..1949fcd8a3 100644 --- a/src/Mod/Assembly/Gui/ViewProviderBomGroup.cpp +++ b/src/Mod/Assembly/Gui/ViewProviderBomGroup.cpp @@ -21,11 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ -#endif - #include #include #include diff --git a/src/Mod/Assembly/Gui/ViewProviderJointGroup.cpp b/src/Mod/Assembly/Gui/ViewProviderJointGroup.cpp index f56dbde95e..d1151761b1 100644 --- a/src/Mod/Assembly/Gui/ViewProviderJointGroup.cpp +++ b/src/Mod/Assembly/Gui/ViewProviderJointGroup.cpp @@ -21,11 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ -#endif - #include #include #include diff --git a/src/Mod/Assembly/Gui/ViewProviderSimulationGroup.cpp b/src/Mod/Assembly/Gui/ViewProviderSimulationGroup.cpp index ccfac42aec..d155d05b49 100644 --- a/src/Mod/Assembly/Gui/ViewProviderSimulationGroup.cpp +++ b/src/Mod/Assembly/Gui/ViewProviderSimulationGroup.cpp @@ -21,11 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ -#endif - #include #include #include diff --git a/src/Mod/Assembly/Gui/ViewProviderViewGroup.cpp b/src/Mod/Assembly/Gui/ViewProviderViewGroup.cpp index bd32b579f3..496de73b48 100644 --- a/src/Mod/Assembly/Gui/ViewProviderViewGroup.cpp +++ b/src/Mod/Assembly/Gui/ViewProviderViewGroup.cpp @@ -21,11 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ -#endif - #include #include #include From 7051848d10946566afe280b38a03f11492b3b588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sun, 21 Sep 2025 16:04:59 +0200 Subject: [PATCH 02/17] Import: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- src/Mod/Import/App/AppImport.cpp | 1 - src/Mod/Import/App/AppImportPy.cpp | 4 +--- src/Mod/Import/App/CMakeLists.txt | 8 +++++++- src/Mod/Import/App/ExportOCAF.cpp | 4 +--- src/Mod/Import/App/ExportOCAF2.cpp | 4 +--- src/Mod/Import/App/ImportOCAF.cpp | 4 +--- src/Mod/Import/App/ImportOCAF2.cpp | 4 +--- src/Mod/Import/App/ImportOCAFAssembly.cpp | 4 +--- src/Mod/Import/App/PreCompiled.cpp | 24 ----------------------- src/Mod/Import/App/PreCompiled.h | 5 ----- src/Mod/Import/App/ReaderGltf.cpp | 3 --- src/Mod/Import/App/ReaderIges.cpp | 4 +--- src/Mod/Import/App/ReaderStep.cpp | 4 +--- src/Mod/Import/App/SketchExportHelper.cpp | 5 +---- src/Mod/Import/App/StepShape.cpp | 4 +--- src/Mod/Import/App/StepShapePyImp.cpp | 1 - src/Mod/Import/App/Tools.cpp | 4 +--- src/Mod/Import/App/WriterGltf.cpp | 3 --- src/Mod/Import/App/WriterIges.cpp | 4 +--- src/Mod/Import/App/WriterStep.cpp | 4 +--- src/Mod/Import/App/dxf/ImpExpDxf.cpp | 3 --- src/Mod/Import/App/dxf/dxf.cpp | 1 - src/Mod/Import/Gui/AppImportGui.cpp | 1 - src/Mod/Import/Gui/AppImportGuiPy.cpp | 4 +--- src/Mod/Import/Gui/CMakeLists.txt | 8 +++++++- src/Mod/Import/Gui/Command.cpp | 1 - src/Mod/Import/Gui/ExportOCAFGui.cpp | 2 -- src/Mod/Import/Gui/ImportOCAFGui.cpp | 2 -- src/Mod/Import/Gui/OCAFBrowser.cpp | 4 +--- src/Mod/Import/Gui/PreCompiled.cpp | 24 ----------------------- src/Mod/Import/Gui/PreCompiled.h | 13 +----------- src/Mod/Import/Gui/Workbench.cpp | 1 - src/Mod/Import/Gui/dxf/ImpExpDxfGui.cpp | 4 ++-- 33 files changed, 32 insertions(+), 134 deletions(-) delete mode 100644 src/Mod/Import/App/PreCompiled.cpp delete mode 100644 src/Mod/Import/Gui/PreCompiled.cpp diff --git a/src/Mod/Import/App/AppImport.cpp b/src/Mod/Import/App/AppImport.cpp index de5b5f3f78..21fa624372 100644 --- a/src/Mod/Import/App/AppImport.cpp +++ b/src/Mod/Import/App/AppImport.cpp @@ -21,7 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Import/App/AppImportPy.cpp b/src/Mod/Import/App/AppImportPy.cpp index 362700b83c..da6bc79b26 100644 --- a/src/Mod/Import/App/AppImportPy.cpp +++ b/src/Mod/Import/App/AppImportPy.cpp @@ -20,11 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #if defined(__MINGW32__) #define WNT // avoid conflict with GUID #endif -#ifndef _PreComp_ + #include #include #if defined(__clang__) @@ -46,7 +45,6 @@ #if defined(__clang__) #pragma clang diagnostic pop #endif -#endif #include #include "dxf/ImpExpDxf.h" diff --git a/src/Mod/Import/App/CMakeLists.txt b/src/Mod/Import/App/CMakeLists.txt index 1235bc5bf1..b9e1f9cf77 100644 --- a/src/Mod/Import/App/CMakeLists.txt +++ b/src/Mod/Import/App/CMakeLists.txt @@ -27,7 +27,6 @@ SET(Import_SRCS StepShape.h StepShape.cpp StepShapePyImp.cpp - PreCompiled.cpp PreCompiled.h Tools.cpp Tools.h @@ -73,6 +72,13 @@ SOURCE_GROUP("SCL" FILES ${SCL_Resources}) generate_from_py(StepShape) add_library(Import SHARED ${Import_SRCS}) + +if(FREECAD_USE_PCH) + target_precompile_headers(Import PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_include_directories( Import PRIVATE diff --git a/src/Mod/Import/App/ExportOCAF.cpp b/src/Mod/Import/App/ExportOCAF.cpp index 814140ce64..b48ef161c3 100644 --- a/src/Mod/Import/App/ExportOCAF.cpp +++ b/src/Mod/Import/App/ExportOCAF.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #if defined(__MINGW32__) #define WNT // avoid conflict with GUID #endif -#ifndef _PreComp_ #include #include #include @@ -40,7 +38,7 @@ #include #include // for Precision::Confusion() #include -#endif + #include #include diff --git a/src/Mod/Import/App/ExportOCAF2.cpp b/src/Mod/Import/App/ExportOCAF2.cpp index cb5ffabb92..ea8ce61dd6 100644 --- a/src/Mod/Import/App/ExportOCAF2.cpp +++ b/src/Mod/Import/App/ExportOCAF2.cpp @@ -20,11 +20,9 @@ * * ****************************************************************************/ -#include "PreCompiled.h" #if defined(__MINGW32__) #define WNT // avoid conflict with GUID #endif -#ifndef _PreComp_ #include #include #include @@ -35,7 +33,7 @@ #include #include #include -#endif + #include diff --git a/src/Mod/Import/App/ImportOCAF.cpp b/src/Mod/Import/App/ImportOCAF.cpp index 65d92029a1..0321d6de8c 100644 --- a/src/Mod/Import/App/ImportOCAF.cpp +++ b/src/Mod/Import/App/ImportOCAF.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #if defined(__MINGW32__) #define WNT // avoid conflict with GUID #endif -#ifndef _PreComp_ #include #include #include @@ -44,7 +42,7 @@ #include #include // for Precision::Confusion() #include -#endif + #include #include diff --git a/src/Mod/Import/App/ImportOCAF2.cpp b/src/Mod/Import/App/ImportOCAF2.cpp index f4f32f8b5f..8ffc0f8ca8 100644 --- a/src/Mod/Import/App/ImportOCAF2.cpp +++ b/src/Mod/Import/App/ImportOCAF2.cpp @@ -20,11 +20,9 @@ * * ****************************************************************************/ -#include "PreCompiled.h" #if defined(__MINGW32__) #define WNT // avoid conflict with GUID #endif -#ifndef _PreComp_ #include #include #include @@ -38,7 +36,7 @@ #include #include #include -#endif + #include #include diff --git a/src/Mod/Import/App/ImportOCAFAssembly.cpp b/src/Mod/Import/App/ImportOCAFAssembly.cpp index 742e89f4f7..3d536828ac 100644 --- a/src/Mod/Import/App/ImportOCAFAssembly.cpp +++ b/src/Mod/Import/App/ImportOCAFAssembly.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #if defined(__MINGW32__) #define WNT // avoid conflict with GUID #endif -#ifndef _PreComp_ #include #include #include @@ -38,7 +36,7 @@ #include #include #include -#endif + #include #include diff --git a/src/Mod/Import/App/PreCompiled.cpp b/src/Mod/Import/App/PreCompiled.cpp deleted file mode 100644 index 7b200a1bf2..0000000000 --- a/src/Mod/Import/App/PreCompiled.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2002 Jürgen Riegel * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" diff --git a/src/Mod/Import/App/PreCompiled.h b/src/Mod/Import/App/PreCompiled.h index 157b9e6fd8..f9a9f76261 100644 --- a/src/Mod/Import/App/PreCompiled.h +++ b/src/Mod/Import/App/PreCompiled.h @@ -26,13 +26,10 @@ #include -#ifdef _PreComp_ - // standard #include #include #include -#include #include #include #include @@ -48,6 +45,4 @@ // Base #include -#endif //_PreComp_ - #endif diff --git a/src/Mod/Import/App/ReaderGltf.cpp b/src/Mod/Import/App/ReaderGltf.cpp index 2671c62359..478e161af0 100644 --- a/src/Mod/Import/App/ReaderGltf.cpp +++ b/src/Mod/Import/App/ReaderGltf.cpp @@ -22,8 +22,6 @@ **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -37,7 +35,6 @@ #include #include #include -#endif #include "ReaderGltf.h" #include "Tools.h" diff --git a/src/Mod/Import/App/ReaderIges.cpp b/src/Mod/Import/App/ReaderIges.cpp index 31a9b56fff..ee76754c1b 100644 --- a/src/Mod/Import/App/ReaderIges.cpp +++ b/src/Mod/Import/App/ReaderIges.cpp @@ -22,8 +22,6 @@ **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -33,7 +31,7 @@ #include #include #include -#endif + #include "ReaderIges.h" #include diff --git a/src/Mod/Import/App/ReaderStep.cpp b/src/Mod/Import/App/ReaderStep.cpp index 45eee35219..75bdac60a4 100644 --- a/src/Mod/Import/App/ReaderStep.cpp +++ b/src/Mod/Import/App/ReaderStep.cpp @@ -22,14 +22,12 @@ **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include #include -#endif + #include "ReaderStep.h" #include diff --git a/src/Mod/Import/App/SketchExportHelper.cpp b/src/Mod/Import/App/SketchExportHelper.cpp index 08f2305b20..a9a73acdd5 100644 --- a/src/Mod/Import/App/SketchExportHelper.cpp +++ b/src/Mod/Import/App/SketchExportHelper.cpp @@ -23,15 +23,12 @@ //! a class to assist with exporting sketches to dxf -#include "PreCompiled.h" - -#ifndef _PreComp_ #include #include #include #include #include -#endif + #include #include diff --git a/src/Mod/Import/App/StepShape.cpp b/src/Mod/Import/App/StepShape.cpp index a09798cbb4..528932d61b 100644 --- a/src/Mod/Import/App/StepShape.cpp +++ b/src/Mod/Import/App/StepShape.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Import/App/StepShapePyImp.cpp b/src/Mod/Import/App/StepShapePyImp.cpp index f1e7f04913..58f9d2ed65 100644 --- a/src/Mod/Import/App/StepShapePyImp.cpp +++ b/src/Mod/Import/App/StepShapePyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" // clang-format off // inclusion of the generated files (generated out of StepShapePy.xml) diff --git a/src/Mod/Import/App/Tools.cpp b/src/Mod/Import/App/Tools.cpp index 5888e6cacf..6382de10f6 100644 --- a/src/Mod/Import/App/Tools.cpp +++ b/src/Mod/Import/App/Tools.cpp @@ -21,12 +21,10 @@ ****************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif + #include #include diff --git a/src/Mod/Import/App/WriterGltf.cpp b/src/Mod/Import/App/WriterGltf.cpp index eb12e3417e..d22e17098a 100644 --- a/src/Mod/Import/App/WriterGltf.cpp +++ b/src/Mod/Import/App/WriterGltf.cpp @@ -22,14 +22,11 @@ **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include #include -#endif #include "WriterGltf.h" #include diff --git a/src/Mod/Import/App/WriterIges.cpp b/src/Mod/Import/App/WriterIges.cpp index 37fe3e367f..a70c15580a 100644 --- a/src/Mod/Import/App/WriterIges.cpp +++ b/src/Mod/Import/App/WriterIges.cpp @@ -22,14 +22,12 @@ **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include #include -#endif + #include "WriterIges.h" #include diff --git a/src/Mod/Import/App/WriterStep.cpp b/src/Mod/Import/App/WriterStep.cpp index 31165b2cd2..df7d9f966b 100644 --- a/src/Mod/Import/App/WriterStep.cpp +++ b/src/Mod/Import/App/WriterStep.cpp @@ -22,12 +22,10 @@ **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif + #include "WriterStep.h" #include diff --git a/src/Mod/Import/App/dxf/ImpExpDxf.cpp b/src/Mod/Import/App/dxf/ImpExpDxf.cpp index 62ab50ca6c..0cbb575308 100644 --- a/src/Mod/Import/App/dxf/ImpExpDxf.cpp +++ b/src/Mod/Import/App/dxf/ImpExpDxf.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #if OCC_VERSION_HEX < 0x070600 #include @@ -61,7 +59,6 @@ #include #include #include -#endif #include #include diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index 5511ab8feb..c3a88bddf3 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -3,7 +3,6 @@ // This program is released under the BSD license. See the file COPYING for details. // modified 2018 wandererfan -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Import/Gui/AppImportGui.cpp b/src/Mod/Import/Gui/AppImportGui.cpp index 516727fbd2..454bd8aa94 100644 --- a/src/Mod/Import/Gui/AppImportGui.cpp +++ b/src/Mod/Import/Gui/AppImportGui.cpp @@ -21,7 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp b/src/Mod/Import/Gui/AppImportGuiPy.cpp index 7654f1d4e7..7ed24b118e 100644 --- a/src/Mod/Import/Gui/AppImportGuiPy.cpp +++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp @@ -20,11 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #if defined(__MINGW32__) #define WNT // avoid conflict with GUID #endif -#ifndef _PreComp_ + #include #include @@ -44,7 +43,6 @@ #if defined(__clang__) #pragma clang diagnostic pop #endif -#endif #include #include "ExportOCAFGui.h" diff --git a/src/Mod/Import/Gui/CMakeLists.txt b/src/Mod/Import/Gui/CMakeLists.txt index 14c83b10b1..16231e68e2 100644 --- a/src/Mod/Import/Gui/CMakeLists.txt +++ b/src/Mod/Import/Gui/CMakeLists.txt @@ -18,13 +18,19 @@ SET(ImportGui_SRCS ImportOCAFGui.h OCAFBrowser.cpp OCAFBrowser.h - PreCompiled.cpp PreCompiled.h Workbench.cpp Workbench.h ) add_library(ImportGui SHARED ${ImportGui_SRCS}) + +if(FREECAD_USE_PCH) + target_precompile_headers(ImportGui PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_include_directories( ImportGui PRIVATE diff --git a/src/Mod/Import/Gui/Command.cpp b/src/Mod/Import/Gui/Command.cpp index 9f83693807..c5d928ef16 100644 --- a/src/Mod/Import/Gui/Command.cpp +++ b/src/Mod/Import/Gui/Command.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Import/Gui/ExportOCAFGui.cpp b/src/Mod/Import/Gui/ExportOCAFGui.cpp index e08ecc1544..a640e3808a 100644 --- a/src/Mod/Import/Gui/ExportOCAFGui.cpp +++ b/src/Mod/Import/Gui/ExportOCAFGui.cpp @@ -22,8 +22,6 @@ **************************************************************************/ -#include "PreCompiled.h" - #include "ExportOCAFGui.h" #include #include diff --git a/src/Mod/Import/Gui/ImportOCAFGui.cpp b/src/Mod/Import/Gui/ImportOCAFGui.cpp index a5cba4c2db..5b9a5fe5ef 100644 --- a/src/Mod/Import/Gui/ImportOCAFGui.cpp +++ b/src/Mod/Import/Gui/ImportOCAFGui.cpp @@ -23,8 +23,6 @@ **************************************************************************/ -#include "PreCompiled.h" - #include "ImportOCAFGui.h" #include #include diff --git a/src/Mod/Import/Gui/OCAFBrowser.cpp b/src/Mod/Import/Gui/OCAFBrowser.cpp index 7a56c5eaed..c485b94d2f 100644 --- a/src/Mod/Import/Gui/OCAFBrowser.cpp +++ b/src/Mod/Import/Gui/OCAFBrowser.cpp @@ -22,8 +22,6 @@ **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -56,7 +54,7 @@ #include #include #include -#endif + #include "OCAFBrowser.h" #include diff --git a/src/Mod/Import/Gui/PreCompiled.cpp b/src/Mod/Import/Gui/PreCompiled.cpp deleted file mode 100644 index 7b200a1bf2..0000000000 --- a/src/Mod/Import/Gui/PreCompiled.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2002 Jürgen Riegel * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" diff --git a/src/Mod/Import/Gui/PreCompiled.h b/src/Mod/Import/Gui/PreCompiled.h index 6584813a0c..e5fa0530e4 100644 --- a/src/Mod/Import/Gui/PreCompiled.h +++ b/src/Mod/Import/Gui/PreCompiled.h @@ -26,8 +26,6 @@ #include -#ifdef _PreComp_ - // standard #include #include @@ -39,7 +37,7 @@ #include #include -#ifndef FC_OS_WIN32 +#ifdef FC_OS_WIN32 #include #endif @@ -73,16 +71,7 @@ #include #include -#ifndef FC_OS_WIN32 -#include -#else -#include -#endif - // Qt Toolkit #include - -#endif //_PreComp_ - #endif // __PRECOMPILED_GUI__ diff --git a/src/Mod/Import/Gui/Workbench.cpp b/src/Mod/Import/Gui/Workbench.cpp index ebdbbf7e7d..5faf397bce 100644 --- a/src/Mod/Import/Gui/Workbench.cpp +++ b/src/Mod/Import/Gui/Workbench.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/Import/Gui/dxf/ImpExpDxfGui.cpp b/src/Mod/Import/Gui/dxf/ImpExpDxfGui.cpp index f6c2597425..0d13f40ec4 100644 --- a/src/Mod/Import/Gui/dxf/ImpExpDxfGui.cpp +++ b/src/Mod/Import/Gui/dxf/ImpExpDxfGui.cpp @@ -21,7 +21,7 @@ ***************************************************************************/ #include -#ifndef _PreComp_ + #include #if OCC_VERSION_HEX < 0x070600 #include @@ -49,7 +49,7 @@ #include #include #include -#endif + #include #include From 4bc92384b7bbe28141b588cb79631f990685ad65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sun, 21 Sep 2025 16:10:44 +0200 Subject: [PATCH 03/17] Inspection: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- src/Mod/Inspection/App/AppInspection.cpp | 1 - src/Mod/Inspection/App/CMakeLists.txt | 10 ++++---- src/Mod/Inspection/App/InspectionFeature.cpp | 4 ---- src/Mod/Inspection/App/PreCompiled.cpp | 23 ------------------- src/Mod/Inspection/App/PreCompiled.h | 4 ---- src/Mod/Inspection/Gui/AppInspectionGui.cpp | 1 - src/Mod/Inspection/Gui/CMakeLists.txt | 13 +++++------ src/Mod/Inspection/Gui/Command.cpp | 4 +--- src/Mod/Inspection/Gui/PreCompiled.cpp | 23 ------------------- src/Mod/Inspection/Gui/PreCompiled.h | 4 ---- .../Inspection/Gui/ViewProviderInspection.cpp | 3 --- src/Mod/Inspection/Gui/VisualInspection.cpp | 3 --- src/Mod/Inspection/Gui/Workbench.cpp | 1 - 13 files changed, 12 insertions(+), 82 deletions(-) delete mode 100644 src/Mod/Inspection/App/PreCompiled.cpp delete mode 100644 src/Mod/Inspection/Gui/PreCompiled.cpp diff --git a/src/Mod/Inspection/App/AppInspection.cpp b/src/Mod/Inspection/App/AppInspection.cpp index 13ed115ee6..1e0eb5e04b 100644 --- a/src/Mod/Inspection/App/AppInspection.cpp +++ b/src/Mod/Inspection/App/AppInspection.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Inspection/App/CMakeLists.txt b/src/Mod/Inspection/App/CMakeLists.txt index 5712ccf32f..c4992428b0 100644 --- a/src/Mod/Inspection/App/CMakeLists.txt +++ b/src/Mod/Inspection/App/CMakeLists.txt @@ -9,7 +9,6 @@ SET(Inspection_SRCS AppInspection.cpp InspectionFeature.cpp InspectionFeature.h - PreCompiled.cpp PreCompiled.h ) @@ -17,13 +16,14 @@ set(Inspection_Scripts ../Init.py ) +add_library(Inspection SHARED ${Inspection_SRCS} ${Inspection_Scripts}) + if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${Inspection_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(Inspection PreCompiled.h PreCompiled.cpp PCH_SRCS) + target_precompile_headers(Inspection PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) endif(FREECAD_USE_PCH) -add_library(Inspection SHARED ${Inspection_SRCS} ${Inspection_Scripts}) target_include_directories( Inspection PRIVATE diff --git a/src/Mod/Inspection/App/InspectionFeature.cpp b/src/Mod/Inspection/App/InspectionFeature.cpp index c6b5594eb8..688cdce1a5 100644 --- a/src/Mod/Inspection/App/InspectionFeature.cpp +++ b/src/Mod/Inspection/App/InspectionFeature.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ #include #include #include @@ -39,7 +36,6 @@ #include #include #include -#endif #include #include diff --git a/src/Mod/Inspection/App/PreCompiled.cpp b/src/Mod/Inspection/App/PreCompiled.cpp deleted file mode 100644 index 2ac4ea20cd..0000000000 --- a/src/Mod/Inspection/App/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2011 Werner Mayer * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/Inspection/App/PreCompiled.h b/src/Mod/Inspection/App/PreCompiled.h index 447cd24797..329650e51c 100644 --- a/src/Mod/Inspection/App/PreCompiled.h +++ b/src/Mod/Inspection/App/PreCompiled.h @@ -25,8 +25,6 @@ #include -#ifdef _PreComp_ - // STL #include @@ -48,6 +46,4 @@ #include #include -#endif //_PreComp_ - #endif diff --git a/src/Mod/Inspection/Gui/AppInspectionGui.cpp b/src/Mod/Inspection/Gui/AppInspectionGui.cpp index a1bda821b0..714bb336d2 100644 --- a/src/Mod/Inspection/Gui/AppInspectionGui.cpp +++ b/src/Mod/Inspection/Gui/AppInspectionGui.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Inspection/Gui/CMakeLists.txt b/src/Mod/Inspection/Gui/CMakeLists.txt index d0adb9a68c..f8a1eeb420 100644 --- a/src/Mod/Inspection/Gui/CMakeLists.txt +++ b/src/Mod/Inspection/Gui/CMakeLists.txt @@ -21,7 +21,6 @@ SET(InspectionGui_SRCS ${Dialogs_SRCS} AppInspectionGui.cpp Command.cpp - PreCompiled.cpp PreCompiled.h ViewProviderInspection.cpp ViewProviderInspection.h @@ -33,12 +32,6 @@ set(InspectionGui_Scripts ../InitGui.py ) -if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${InspectionGui_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(InspectionGui PreCompiled.h PreCompiled.cpp PCH_SRCS) -endif(FREECAD_USE_PCH) - SET(InspectionGuiIcon_SVG Resources/icons/InspectionWorkbench.svg ) @@ -49,6 +42,12 @@ add_library(InspectionGui SHARED ${InspectionGuiIcon_SVG} ) +if(FREECAD_USE_PCH) + target_precompile_headers(InspectionGui PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_include_directories( InspectionGui PRIVATE diff --git a/src/Mod/Inspection/Gui/Command.cpp b/src/Mod/Inspection/Gui/Command.cpp index 29ab5bec00..14f7c7fd53 100644 --- a/src/Mod/Inspection/Gui/Command.cpp +++ b/src/Mod/Inspection/Gui/Command.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Inspection/Gui/PreCompiled.cpp b/src/Mod/Inspection/Gui/PreCompiled.cpp deleted file mode 100644 index 2ac4ea20cd..0000000000 --- a/src/Mod/Inspection/Gui/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2011 Werner Mayer * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/Inspection/Gui/PreCompiled.h b/src/Mod/Inspection/Gui/PreCompiled.h index 74816df791..fda61dfe10 100644 --- a/src/Mod/Inspection/Gui/PreCompiled.h +++ b/src/Mod/Inspection/Gui/PreCompiled.h @@ -26,8 +26,6 @@ #include -#ifdef _PreComp_ - // STL // Inventor @@ -54,6 +52,4 @@ #include #include -#endif //_PreComp_ - #endif // GUI_PRECOMPILED_H diff --git a/src/Mod/Inspection/Gui/ViewProviderInspection.cpp b/src/Mod/Inspection/Gui/ViewProviderInspection.cpp index cd0728be80..d720bff784 100644 --- a/src/Mod/Inspection/Gui/ViewProviderInspection.cpp +++ b/src/Mod/Inspection/Gui/ViewProviderInspection.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -44,7 +42,6 @@ #include #include #include -#endif #include #include diff --git a/src/Mod/Inspection/Gui/VisualInspection.cpp b/src/Mod/Inspection/Gui/VisualInspection.cpp index 5be5012921..8d55cdc6ca 100644 --- a/src/Mod/Inspection/Gui/VisualInspection.cpp +++ b/src/Mod/Inspection/Gui/VisualInspection.cpp @@ -20,10 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif #include #include diff --git a/src/Mod/Inspection/Gui/Workbench.cpp b/src/Mod/Inspection/Gui/Workbench.cpp index c2a02150d0..001438333d 100644 --- a/src/Mod/Inspection/Gui/Workbench.cpp +++ b/src/Mod/Inspection/Gui/Workbench.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "Workbench.h" From 93830929ae61792d80fefe1e53200d718afab9c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sun, 21 Sep 2025 16:20:36 +0200 Subject: [PATCH 04/17] Measure: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- src/Mod/Measure/App/AppMeasure.cpp | 2 +- src/Mod/Measure/App/AppMeasurePy.cpp | 5 ---- src/Mod/Measure/App/CMakeLists.txt | 13 +++++------ src/Mod/Measure/App/MeasureAngle.cpp | 2 -- src/Mod/Measure/App/MeasureArea.cpp | 2 -- src/Mod/Measure/App/MeasureBase.cpp | 2 +- src/Mod/Measure/App/MeasureBasePyImp.cpp | 1 - src/Mod/Measure/App/MeasureDistance.cpp | 2 -- src/Mod/Measure/App/MeasureLength.cpp | 2 -- src/Mod/Measure/App/MeasurePosition.cpp | 2 -- src/Mod/Measure/App/MeasureRadius.cpp | 2 -- src/Mod/Measure/App/Measurement.cpp | 3 --- src/Mod/Measure/App/MeasurementPyImp.cpp | 4 +--- src/Mod/Measure/App/PreCompiled.cpp | 23 ------------------- src/Mod/Measure/App/PreCompiled.h | 3 --- src/Mod/Measure/App/Preferences.cpp | 4 +--- src/Mod/Measure/App/ShapeFinder.cpp | 4 ---- src/Mod/Measure/App/SubnameHelper.cpp | 4 ---- src/Mod/Measure/Gui/AppMeasureGui.cpp | 4 +--- src/Mod/Measure/Gui/CMakeLists.txt | 14 +++++------ src/Mod/Measure/Gui/Command.cpp | 3 --- .../Gui/DlgPrefsMeasureAppearanceImp.cpp | 1 - src/Mod/Measure/Gui/PreCompiled.cpp | 22 ------------------ src/Mod/Measure/Gui/PreCompiled.h | 4 ---- src/Mod/Measure/Gui/QuickMeasure.cpp | 4 +--- src/Mod/Measure/Gui/QuickMeasurePyImp.cpp | 4 ---- src/Mod/Measure/Gui/TaskMeasure.cpp | 4 ---- .../Measure/Gui/ViewProviderMeasureAngle.cpp | 4 +--- .../Measure/Gui/ViewProviderMeasureBase.cpp | 4 +--- .../Gui/ViewProviderMeasureDistance.cpp | 4 +--- 30 files changed, 22 insertions(+), 130 deletions(-) delete mode 100644 src/Mod/Measure/App/PreCompiled.cpp delete mode 100644 src/Mod/Measure/Gui/PreCompiled.cpp diff --git a/src/Mod/Measure/App/AppMeasure.cpp b/src/Mod/Measure/App/AppMeasure.cpp index 3e71e5c6f6..1c165faf48 100644 --- a/src/Mod/Measure/App/AppMeasure.cpp +++ b/src/Mod/Measure/App/AppMeasure.cpp @@ -20,7 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include #include #include diff --git a/src/Mod/Measure/App/AppMeasurePy.cpp b/src/Mod/Measure/App/AppMeasurePy.cpp index f960c40073..ca88c173d4 100644 --- a/src/Mod/Measure/App/AppMeasurePy.cpp +++ b/src/Mod/Measure/App/AppMeasurePy.cpp @@ -21,11 +21,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ - -#endif #include #include // clears "include what you use" lint message, but creates "included header not used" diff --git a/src/Mod/Measure/App/CMakeLists.txt b/src/Mod/Measure/App/CMakeLists.txt index 502fa08afd..3cce71d004 100644 --- a/src/Mod/Measure/App/CMakeLists.txt +++ b/src/Mod/Measure/App/CMakeLists.txt @@ -15,7 +15,6 @@ SET(Python_SRCS SOURCE_GROUP("Python" FILES ${Python_SRCS}) SET(MeasureModule_SRCS - PreCompiled.cpp PreCompiled.h AppMeasure.cpp AppMeasurePy.cpp @@ -56,14 +55,14 @@ SET(Measure_SRCS ${Python_SRCS} ) -if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" Measure_CPP_SRCS ${Measure_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(Measure PreCompiled.h PreCompiled.cpp Measure_CPP_SRCS) -endif(FREECAD_USE_PCH) - add_library(Measure SHARED ${Measure_SRCS}) +if(FREECAD_USE_PCH) + target_precompile_headers(Measure PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_include_directories( Measure PRIVATE diff --git a/src/Mod/Measure/App/MeasureAngle.cpp b/src/Mod/Measure/App/MeasureAngle.cpp index 5e72fbe5b4..88c85d91d6 100644 --- a/src/Mod/Measure/App/MeasureAngle.cpp +++ b/src/Mod/Measure/App/MeasureAngle.cpp @@ -20,8 +20,6 @@ **************************************************************************/ -#include "PreCompiled.h" - #include #include #include diff --git a/src/Mod/Measure/App/MeasureArea.cpp b/src/Mod/Measure/App/MeasureArea.cpp index 474c11a7cd..a6f640e23a 100644 --- a/src/Mod/Measure/App/MeasureArea.cpp +++ b/src/Mod/Measure/App/MeasureArea.cpp @@ -20,8 +20,6 @@ **************************************************************************/ -#include "PreCompiled.h" - #include #include #include diff --git a/src/Mod/Measure/App/MeasureBase.cpp b/src/Mod/Measure/App/MeasureBase.cpp index 0a6fb205c9..0535502fc9 100644 --- a/src/Mod/Measure/App/MeasureBase.cpp +++ b/src/Mod/Measure/App/MeasureBase.cpp @@ -19,7 +19,7 @@ * * **************************************************************************/ -#include "PreCompiled.h" +#include #include #include diff --git a/src/Mod/Measure/App/MeasureBasePyImp.cpp b/src/Mod/Measure/App/MeasureBasePyImp.cpp index 8230138093..0292b61115 100644 --- a/src/Mod/Measure/App/MeasureBasePyImp.cpp +++ b/src/Mod/Measure/App/MeasureBasePyImp.cpp @@ -1,4 +1,3 @@ -#include "PreCompiled.h" #include "MeasureBase.h" diff --git a/src/Mod/Measure/App/MeasureDistance.cpp b/src/Mod/Measure/App/MeasureDistance.cpp index 2702860f8c..12263d2a89 100644 --- a/src/Mod/Measure/App/MeasureDistance.cpp +++ b/src/Mod/Measure/App/MeasureDistance.cpp @@ -20,8 +20,6 @@ **************************************************************************/ -#include "PreCompiled.h" - #include #include #include diff --git a/src/Mod/Measure/App/MeasureLength.cpp b/src/Mod/Measure/App/MeasureLength.cpp index f2e5ccc49b..f8d7f718ca 100644 --- a/src/Mod/Measure/App/MeasureLength.cpp +++ b/src/Mod/Measure/App/MeasureLength.cpp @@ -20,8 +20,6 @@ **************************************************************************/ -#include "PreCompiled.h" - #include #include #include diff --git a/src/Mod/Measure/App/MeasurePosition.cpp b/src/Mod/Measure/App/MeasurePosition.cpp index 8c871c29fa..f6ca40a95f 100644 --- a/src/Mod/Measure/App/MeasurePosition.cpp +++ b/src/Mod/Measure/App/MeasurePosition.cpp @@ -20,8 +20,6 @@ **************************************************************************/ -#include "PreCompiled.h" - #include #include #include diff --git a/src/Mod/Measure/App/MeasureRadius.cpp b/src/Mod/Measure/App/MeasureRadius.cpp index 5fb3c6206b..0b28d2e115 100644 --- a/src/Mod/Measure/App/MeasureRadius.cpp +++ b/src/Mod/Measure/App/MeasureRadius.cpp @@ -19,8 +19,6 @@ * * **************************************************************************/ -#include "PreCompiled.h" - #include #include diff --git a/src/Mod/Measure/App/Measurement.cpp b/src/Mod/Measure/App/Measurement.cpp index 6d0e21c985..7ea67b0ad1 100644 --- a/src/Mod/Measure/App/Measurement.cpp +++ b/src/Mod/Measure/App/Measurement.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -38,7 +36,6 @@ #include #include #include -#endif #include diff --git a/src/Mod/Measure/App/MeasurementPyImp.cpp b/src/Mod/Measure/App/MeasurementPyImp.cpp index ec2fe97ce4..eb2fc1d581 100644 --- a/src/Mod/Measure/App/MeasurementPyImp.cpp +++ b/src/Mod/Measure/App/MeasurementPyImp.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Measure/App/PreCompiled.cpp b/src/Mod/Measure/App/PreCompiled.cpp deleted file mode 100644 index cde4369c5b..0000000000 --- a/src/Mod/Measure/App/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2008 Jürgen Riegel * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/Measure/App/PreCompiled.h b/src/Mod/Measure/App/PreCompiled.h index ee6e3a5092..d299b3a595 100644 --- a/src/Mod/Measure/App/PreCompiled.h +++ b/src/Mod/Measure/App/PreCompiled.h @@ -27,7 +27,6 @@ #include -#ifdef _PreComp_ // standard #include @@ -43,6 +42,4 @@ #include -#endif //_PreComp_ - #endif // MEASUREGUI_PRECOMPILED_H diff --git a/src/Mod/Measure/App/Preferences.cpp b/src/Mod/Measure/App/Preferences.cpp index 17972acdd2..2b6bd891e4 100644 --- a/src/Mod/Measure/App/Preferences.cpp +++ b/src/Mod/Measure/App/Preferences.cpp @@ -19,10 +19,8 @@ * * **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Measure/App/ShapeFinder.cpp b/src/Mod/Measure/App/ShapeFinder.cpp index fa22f96f7e..dbaff7058d 100644 --- a/src/Mod/Measure/App/ShapeFinder.cpp +++ b/src/Mod/Measure/App/ShapeFinder.cpp @@ -26,10 +26,6 @@ //! and its placement. -#include "PreCompiled.h" -#ifndef _PreComp_ -#endif - #include #include diff --git a/src/Mod/Measure/App/SubnameHelper.cpp b/src/Mod/Measure/App/SubnameHelper.cpp index b929e605b8..c3e0ffca0a 100644 --- a/src/Mod/Measure/App/SubnameHelper.cpp +++ b/src/Mod/Measure/App/SubnameHelper.cpp @@ -24,10 +24,6 @@ //! a class to perform common operations on subelement names. -#include "PreCompiled.h" -#ifndef _PreComp_ -#endif - #include #include diff --git a/src/Mod/Measure/Gui/AppMeasureGui.cpp b/src/Mod/Measure/Gui/AppMeasureGui.cpp index 65f77deb8e..135126fbc0 100644 --- a/src/Mod/Measure/Gui/AppMeasureGui.cpp +++ b/src/Mod/Measure/Gui/AppMeasureGui.cpp @@ -19,10 +19,8 @@ * * **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include #include diff --git a/src/Mod/Measure/Gui/CMakeLists.txt b/src/Mod/Measure/Gui/CMakeLists.txt index a65e505edc..7e0789d8b4 100644 --- a/src/Mod/Measure/Gui/CMakeLists.txt +++ b/src/Mod/Measure/Gui/CMakeLists.txt @@ -29,7 +29,6 @@ SET(MeasureGui_SRCS AppMeasureGui.cpp Command.cpp Resources/Measure.qrc - PreCompiled.cpp PreCompiled.h QuickMeasure.pyi QuickMeasurePyImp.cpp @@ -58,17 +57,18 @@ SET(MeasureGuiTaskDlgs_SRCS # ../InitGui.py #) -if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${MeasureGui_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(MeasureGui PreCompiled.h PreCompiled.cpp PCH_SRCS) -endif(FREECAD_USE_PCH) - SET(MeasureGuiIcon_SVG Resources/icons/preferences-measure.svg ) add_library(MeasureGui SHARED ${MeasureGui_SRCS} ${MeasureGuiIcon_SVG}) + +if(FREECAD_USE_PCH) + target_precompile_headers(MeasureGui PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_include_directories( MeasureGui PRIVATE diff --git a/src/Mod/Measure/Gui/Command.cpp b/src/Mod/Measure/Gui/Command.cpp index 3cf5860b31..1cb8dd019f 100644 --- a/src/Mod/Measure/Gui/Command.cpp +++ b/src/Mod/Measure/Gui/Command.cpp @@ -19,10 +19,7 @@ * * **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif #include #include diff --git a/src/Mod/Measure/Gui/DlgPrefsMeasureAppearanceImp.cpp b/src/Mod/Measure/Gui/DlgPrefsMeasureAppearanceImp.cpp index 196b4d44e4..232a08c678 100644 --- a/src/Mod/Measure/Gui/DlgPrefsMeasureAppearanceImp.cpp +++ b/src/Mod/Measure/Gui/DlgPrefsMeasureAppearanceImp.cpp @@ -19,7 +19,6 @@ * * **************************************************************************/ -#include "PreCompiled.h" #include "DlgPrefsMeasureAppearanceImp.h" #include "ui_DlgPrefsMeasureAppearanceImp.h" diff --git a/src/Mod/Measure/Gui/PreCompiled.cpp b/src/Mod/Measure/Gui/PreCompiled.cpp deleted file mode 100644 index 78c1dbe181..0000000000 --- a/src/Mod/Measure/Gui/PreCompiled.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2023 David Friedli * - * * - * This file is part of FreeCAD. * - * * - * FreeCAD is free software: you can redistribute it and/or modify it * - * under the terms of the GNU Lesser General Public License as * - * published by the Free Software Foundation, either version 2.1 of the * - * License, or (at your option) any later version. * - * * - * FreeCAD is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with FreeCAD. If not, see * - * . * - * * - **************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/Measure/Gui/PreCompiled.h b/src/Mod/Measure/Gui/PreCompiled.h index ea0800dd42..b63b089ad6 100644 --- a/src/Mod/Measure/Gui/PreCompiled.h +++ b/src/Mod/Measure/Gui/PreCompiled.h @@ -30,8 +30,6 @@ #include #endif -#ifdef _PreComp_ - // standard #include @@ -75,6 +73,4 @@ // Inventor includes OpenGL #include -#endif //_PreComp_ - #endif diff --git a/src/Mod/Measure/Gui/QuickMeasure.cpp b/src/Mod/Measure/Gui/QuickMeasure.cpp index dc521da1a4..a12fff8703 100644 --- a/src/Mod/Measure/Gui/QuickMeasure.cpp +++ b/src/Mod/Measure/Gui/QuickMeasure.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif + #include #include diff --git a/src/Mod/Measure/Gui/QuickMeasurePyImp.cpp b/src/Mod/Measure/Gui/QuickMeasurePyImp.cpp index df1eef886c..0b3f199df5 100644 --- a/src/Mod/Measure/Gui/QuickMeasurePyImp.cpp +++ b/src/Mod/Measure/Gui/QuickMeasurePyImp.cpp @@ -20,10 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ -#endif - #include #include #include diff --git a/src/Mod/Measure/Gui/TaskMeasure.cpp b/src/Mod/Measure/Gui/TaskMeasure.cpp index 53fe55f515..6f8a3ffa54 100644 --- a/src/Mod/Measure/Gui/TaskMeasure.cpp +++ b/src/Mod/Measure/Gui/TaskMeasure.cpp @@ -20,12 +20,8 @@ **************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ #include #include -#endif #include "TaskMeasure.h" diff --git a/src/Mod/Measure/Gui/ViewProviderMeasureAngle.cpp b/src/Mod/Measure/Gui/ViewProviderMeasureAngle.cpp index aa2aeb01fb..76137fca45 100644 --- a/src/Mod/Measure/Gui/ViewProviderMeasureAngle.cpp +++ b/src/Mod/Measure/Gui/ViewProviderMeasureAngle.cpp @@ -20,9 +20,7 @@ * * **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -51,7 +49,7 @@ #include #include #include -#endif + #include #include diff --git a/src/Mod/Measure/Gui/ViewProviderMeasureBase.cpp b/src/Mod/Measure/Gui/ViewProviderMeasureBase.cpp index 45e60e815c..1eaf918c1d 100644 --- a/src/Mod/Measure/Gui/ViewProviderMeasureBase.cpp +++ b/src/Mod/Measure/Gui/ViewProviderMeasureBase.cpp @@ -21,9 +21,7 @@ #include "Gui/Application.h" #include "Gui/MDIView.h" -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -38,7 +36,7 @@ #include #include #include -#endif + #include #include diff --git a/src/Mod/Measure/Gui/ViewProviderMeasureDistance.cpp b/src/Mod/Measure/Gui/ViewProviderMeasureDistance.cpp index a53d528b7b..22f0fe0fc4 100644 --- a/src/Mod/Measure/Gui/ViewProviderMeasureDistance.cpp +++ b/src/Mod/Measure/Gui/ViewProviderMeasureDistance.cpp @@ -21,9 +21,7 @@ * * **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -47,7 +45,7 @@ #include #include #include -#endif + #include From 914f6bec44f0e6b14f4752bd567ebe1fde7ce31c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sun, 21 Sep 2025 16:33:50 +0200 Subject: [PATCH 05/17] ReverseEngineering: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- .../App/AppReverseEngineering.cpp | 4 +--- .../ReverseEngineering/App/ApproxSurface.cpp | 3 --- .../ReverseEngineering/App/BSplineFitting.cpp | 3 --- src/Mod/ReverseEngineering/App/CMakeLists.txt | 13 +++++------ .../ReverseEngineering/App/PreCompiled.cpp | 23 ------------------- src/Mod/ReverseEngineering/App/PreCompiled.h | 2 -- .../ReverseEngineering/App/RegionGrowing.cpp | 4 +--- .../App/SampleConsensus.cpp | 4 +--- .../ReverseEngineering/App/Segmentation.cpp | 1 - .../App/SurfaceTriangulation.cpp | 1 - .../Gui/AppReverseEngineeringGui.cpp | 1 - src/Mod/ReverseEngineering/Gui/CMakeLists.txt | 13 +++++------ src/Mod/ReverseEngineering/Gui/Command.cpp | 3 --- .../Gui/FitBSplineCurve.cpp | 4 +--- .../Gui/FitBSplineSurface.cpp | 4 +--- src/Mod/ReverseEngineering/Gui/Poisson.cpp | 4 +--- .../ReverseEngineering/Gui/PreCompiled.cpp | 23 ------------------- src/Mod/ReverseEngineering/Gui/PreCompiled.h | 4 ---- .../ReverseEngineering/Gui/Segmentation.cpp | 3 --- .../Gui/SegmentationManual.cpp | 4 +--- src/Mod/ReverseEngineering/Gui/Workbench.cpp | 1 - 21 files changed, 19 insertions(+), 103 deletions(-) delete mode 100644 src/Mod/ReverseEngineering/App/PreCompiled.cpp delete mode 100644 src/Mod/ReverseEngineering/Gui/PreCompiled.cpp diff --git a/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp b/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp index 965f096e2b..fcf83dfd00 100644 --- a/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp +++ b/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/ReverseEngineering/App/ApproxSurface.cpp b/src/Mod/ReverseEngineering/App/ApproxSurface.cpp index c9dbef0cc9..e37b3a311c 100644 --- a/src/Mod/ReverseEngineering/App/ApproxSurface.cpp +++ b/src/Mod/ReverseEngineering/App/ApproxSurface.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -30,7 +28,6 @@ #include #include #include -#endif #include #include diff --git a/src/Mod/ReverseEngineering/App/BSplineFitting.cpp b/src/Mod/ReverseEngineering/App/BSplineFitting.cpp index e9e46e7696..110c0e090f 100644 --- a/src/Mod/ReverseEngineering/App/BSplineFitting.cpp +++ b/src/Mod/ReverseEngineering/App/BSplineFitting.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #if defined(HAVE_PCL_OPENNURBS) -#ifndef _PreComp_ #include #include @@ -30,7 +28,6 @@ #include #include #include -#endif #include diff --git a/src/Mod/ReverseEngineering/App/CMakeLists.txt b/src/Mod/ReverseEngineering/App/CMakeLists.txt index 63249bec7d..fb567cc857 100644 --- a/src/Mod/ReverseEngineering/App/CMakeLists.txt +++ b/src/Mod/ReverseEngineering/App/CMakeLists.txt @@ -48,18 +48,17 @@ SET(Reen_SRCS Segmentation.h SurfaceTriangulation.cpp SurfaceTriangulation.h - PreCompiled.cpp PreCompiled.h ) -if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${Reen_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(ReverseEngineering PreCompiled.h PreCompiled.cpp PCH_SRCS) -endif(FREECAD_USE_PCH) - add_library(ReverseEngineering SHARED ${Reen_SRCS}) +if(FREECAD_USE_PCH) + target_precompile_headers(ReverseEngineering PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_include_directories( ReverseEngineering PRIVATE diff --git a/src/Mod/ReverseEngineering/App/PreCompiled.cpp b/src/Mod/ReverseEngineering/App/PreCompiled.cpp deleted file mode 100644 index cde4369c5b..0000000000 --- a/src/Mod/ReverseEngineering/App/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2008 Jürgen Riegel * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/ReverseEngineering/App/PreCompiled.h b/src/Mod/ReverseEngineering/App/PreCompiled.h index 54aab5795c..04fba174a8 100644 --- a/src/Mod/ReverseEngineering/App/PreCompiled.h +++ b/src/Mod/ReverseEngineering/App/PreCompiled.h @@ -30,7 +30,6 @@ #define BOOST_BIND_GLOBAL_PLACEHOLDERS #endif -#ifdef _PreComp_ // standard #include @@ -50,5 +49,4 @@ #include #include -#endif // _PreComp_ #endif diff --git a/src/Mod/ReverseEngineering/App/RegionGrowing.cpp b/src/Mod/ReverseEngineering/App/RegionGrowing.cpp index c0c9b6c122..7fe8bd71f3 100644 --- a/src/Mod/ReverseEngineering/App/RegionGrowing.cpp +++ b/src/Mod/ReverseEngineering/App/RegionGrowing.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/ReverseEngineering/App/SampleConsensus.cpp b/src/Mod/ReverseEngineering/App/SampleConsensus.cpp index 74ba78d981..2c5a41c773 100644 --- a/src/Mod/ReverseEngineering/App/SampleConsensus.cpp +++ b/src/Mod/ReverseEngineering/App/SampleConsensus.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/ReverseEngineering/App/Segmentation.cpp b/src/Mod/ReverseEngineering/App/Segmentation.cpp index 78368dfe59..22ce5594c7 100644 --- a/src/Mod/ReverseEngineering/App/Segmentation.cpp +++ b/src/Mod/ReverseEngineering/App/Segmentation.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/ReverseEngineering/App/SurfaceTriangulation.cpp b/src/Mod/ReverseEngineering/App/SurfaceTriangulation.cpp index 3a97fe2bfc..4669345199 100644 --- a/src/Mod/ReverseEngineering/App/SurfaceTriangulation.cpp +++ b/src/Mod/ReverseEngineering/App/SurfaceTriangulation.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp b/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp index 3ae29c3393..3bd6d7bba3 100644 --- a/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp +++ b/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/ReverseEngineering/Gui/CMakeLists.txt b/src/Mod/ReverseEngineering/Gui/CMakeLists.txt index 3bbe834167..a987baf480 100644 --- a/src/Mod/ReverseEngineering/Gui/CMakeLists.txt +++ b/src/Mod/ReverseEngineering/Gui/CMakeLists.txt @@ -39,7 +39,6 @@ SET(ReenGui_SRCS AppReverseEngineeringGui.cpp Command.cpp Resources/ReverseEngineering.qrc - PreCompiled.cpp PreCompiled.h Workbench.cpp Workbench.h @@ -49,17 +48,17 @@ SET(ReverseEngineeringGuiIcon_SVG Resources/icons/ReverseEngineeringWorkbench.svg ) -if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${ReenGui_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(ReverseEngineeringGui PreCompiled.h PreCompiled.cpp PCH_SRCS) -endif(FREECAD_USE_PCH) - add_library(ReverseEngineeringGui SHARED ${ReenGui_SRCS} ${ReverseEngineeringGuiIcon_SVG} ) +if(FREECAD_USE_PCH) + target_precompile_headers(ReverseEngineeringGui PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_include_directories( ReverseEngineeringGui PRIVATE diff --git a/src/Mod/ReverseEngineering/Gui/Command.cpp b/src/Mod/ReverseEngineering/Gui/Command.cpp index 3d8b02f0d4..0b79942a02 100644 --- a/src/Mod/ReverseEngineering/Gui/Command.cpp +++ b/src/Mod/ReverseEngineering/Gui/Command.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -30,7 +28,6 @@ #include #include #include -#endif #include #include diff --git a/src/Mod/ReverseEngineering/Gui/FitBSplineCurve.cpp b/src/Mod/ReverseEngineering/Gui/FitBSplineCurve.cpp index 153b8ee421..104b86ee6e 100644 --- a/src/Mod/ReverseEngineering/Gui/FitBSplineCurve.cpp +++ b/src/Mod/ReverseEngineering/Gui/FitBSplineCurve.cpp @@ -21,11 +21,9 @@ * * **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp b/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp index fe2b69232d..a0728dd35d 100644 --- a/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp +++ b/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/ReverseEngineering/Gui/Poisson.cpp b/src/Mod/ReverseEngineering/Gui/Poisson.cpp index bcb3673542..05e52e54c1 100644 --- a/src/Mod/ReverseEngineering/Gui/Poisson.cpp +++ b/src/Mod/ReverseEngineering/Gui/Poisson.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/ReverseEngineering/Gui/PreCompiled.cpp b/src/Mod/ReverseEngineering/Gui/PreCompiled.cpp deleted file mode 100644 index cde4369c5b..0000000000 --- a/src/Mod/ReverseEngineering/Gui/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2008 Jürgen Riegel * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/ReverseEngineering/Gui/PreCompiled.h b/src/Mod/ReverseEngineering/Gui/PreCompiled.h index 4b6b1ef0a9..a3e3f6d1e3 100644 --- a/src/Mod/ReverseEngineering/Gui/PreCompiled.h +++ b/src/Mod/ReverseEngineering/Gui/PreCompiled.h @@ -25,8 +25,6 @@ #include -#ifdef _PreComp_ - // standard #include #include @@ -45,6 +43,4 @@ #include #include -#endif //_PreComp_ - #endif // __PRECOMPILED_GUI__ diff --git a/src/Mod/ReverseEngineering/Gui/Segmentation.cpp b/src/Mod/ReverseEngineering/Gui/Segmentation.cpp index 1f9a119952..7c2395571a 100644 --- a/src/Mod/ReverseEngineering/Gui/Segmentation.cpp +++ b/src/Mod/ReverseEngineering/Gui/Segmentation.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include @@ -31,7 +29,6 @@ #include #include #include -#endif #include #include diff --git a/src/Mod/ReverseEngineering/Gui/SegmentationManual.cpp b/src/Mod/ReverseEngineering/Gui/SegmentationManual.cpp index 0b0bac5e83..d3e2dc8234 100644 --- a/src/Mod/ReverseEngineering/Gui/SegmentationManual.cpp +++ b/src/Mod/ReverseEngineering/Gui/SegmentationManual.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/ReverseEngineering/Gui/Workbench.cpp b/src/Mod/ReverseEngineering/Gui/Workbench.cpp index c0463a04df..aec5dffa46 100644 --- a/src/Mod/ReverseEngineering/Gui/Workbench.cpp +++ b/src/Mod/ReverseEngineering/Gui/Workbench.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include From cfe0d9ffacf9f0551bf5594e4e105cef00bb2a0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sun, 21 Sep 2025 16:39:50 +0200 Subject: [PATCH 06/17] Surface: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- src/Mod/Surface/App/AppSurface.cpp | 1 - src/Mod/Surface/App/Blending/BlendCurve.cpp | 4 +--- .../Surface/App/Blending/BlendCurvePyImp.cpp | 1 - src/Mod/Surface/App/Blending/BlendPoint.cpp | 4 +--- .../Surface/App/Blending/BlendPointPyImp.cpp | 4 +--- .../App/Blending/FeatureBlendCurve.cpp | 4 +--- src/Mod/Surface/App/CMakeLists.txt | 10 ++++---- src/Mod/Surface/App/FeatureCut.cpp | 4 +--- src/Mod/Surface/App/FeatureExtend.cpp | 6 ++--- src/Mod/Surface/App/FeatureFilling.cpp | 3 --- .../Surface/App/FeatureGeomFillSurface.cpp | 4 +--- src/Mod/Surface/App/FeatureSections.cpp | 4 +--- src/Mod/Surface/App/FeatureSewing.cpp | 4 +--- src/Mod/Surface/App/PreCompiled.cpp | 23 ------------------- src/Mod/Surface/App/PreCompiled.h | 4 ---- src/Mod/Surface/Gui/AppSurfaceGui.cpp | 1 - .../Surface/Gui/Blending/TaskBlendCurve.cpp | 3 --- .../Gui/Blending/ViewProviderBlendCurve.cpp | 3 --- src/Mod/Surface/Gui/CMakeLists.txt | 13 +++++------ src/Mod/Surface/Gui/Command.cpp | 3 --- src/Mod/Surface/Gui/PreCompiled.cpp | 23 ------------------- src/Mod/Surface/Gui/PreCompiled.h | 4 ---- src/Mod/Surface/Gui/TaskFilling.cpp | 3 --- src/Mod/Surface/Gui/TaskFillingEdge.cpp | 3 --- src/Mod/Surface/Gui/TaskFillingVertex.cpp | 4 +--- src/Mod/Surface/Gui/TaskGeomFillSurface.cpp | 4 +--- src/Mod/Surface/Gui/TaskSections.cpp | 3 --- src/Mod/Surface/Gui/ViewProviderExtend.cpp | 1 - src/Mod/Surface/Gui/Workbench.cpp | 1 - 29 files changed, 23 insertions(+), 126 deletions(-) delete mode 100644 src/Mod/Surface/App/PreCompiled.cpp delete mode 100644 src/Mod/Surface/Gui/PreCompiled.cpp diff --git a/src/Mod/Surface/App/AppSurface.cpp b/src/Mod/Surface/App/AppSurface.cpp index 171aff3791..8a6ebe824b 100644 --- a/src/Mod/Surface/App/AppSurface.cpp +++ b/src/Mod/Surface/App/AppSurface.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Surface/App/Blending/BlendCurve.cpp b/src/Mod/Surface/App/Blending/BlendCurve.cpp index fb32c88652..47c6adc04a 100644 --- a/src/Mod/Surface/App/Blending/BlendCurve.cpp +++ b/src/Mod/Surface/App/Blending/BlendCurve.cpp @@ -21,8 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -31,7 +29,7 @@ #include #include #include -#endif + #include "Blending/BlendCurve.h" #include "Blending/BlendCurvePy.h" #include diff --git a/src/Mod/Surface/App/Blending/BlendCurvePyImp.cpp b/src/Mod/Surface/App/Blending/BlendCurvePyImp.cpp index a5dfb9eeeb..43b83684e6 100644 --- a/src/Mod/Surface/App/Blending/BlendCurvePyImp.cpp +++ b/src/Mod/Surface/App/Blending/BlendCurvePyImp.cpp @@ -20,7 +20,6 @@ // * * // ***************************************************************************/ -#include "PreCompiled.h" // clang-format off #include "Blending/BlendCurvePy.h" diff --git a/src/Mod/Surface/App/Blending/BlendPoint.cpp b/src/Mod/Surface/App/Blending/BlendPoint.cpp index 8e6f24d99f..4be72afc77 100644 --- a/src/Mod/Surface/App/Blending/BlendPoint.cpp +++ b/src/Mod/Surface/App/Blending/BlendPoint.cpp @@ -21,11 +21,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include "Blending/BlendPoint.h" #include "Blending/BlendPointPy.h" diff --git a/src/Mod/Surface/App/Blending/BlendPointPyImp.cpp b/src/Mod/Surface/App/Blending/BlendPointPyImp.cpp index 6ffc238a9b..d1709ad90c 100644 --- a/src/Mod/Surface/App/Blending/BlendPointPyImp.cpp +++ b/src/Mod/Surface/App/Blending/BlendPointPyImp.cpp @@ -20,11 +20,9 @@ // * * // ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + // clang-format off #include "Blending/BlendPoint.h" diff --git a/src/Mod/Surface/App/Blending/FeatureBlendCurve.cpp b/src/Mod/Surface/App/Blending/FeatureBlendCurve.cpp index b7542c037b..7f9596be57 100644 --- a/src/Mod/Surface/App/Blending/FeatureBlendCurve.cpp +++ b/src/Mod/Surface/App/Blending/FeatureBlendCurve.cpp @@ -21,14 +21,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include #include -#endif + #include "Mod/Surface/App/Blending/BlendCurve.h" #include "Mod/Surface/App/Blending/BlendPoint.h" diff --git a/src/Mod/Surface/App/CMakeLists.txt b/src/Mod/Surface/App/CMakeLists.txt index 32c0926d65..cb2ed678a4 100644 --- a/src/Mod/Surface/App/CMakeLists.txt +++ b/src/Mod/Surface/App/CMakeLists.txt @@ -30,7 +30,6 @@ SET(Surface_SRCS ${Blending_SRCS} ${BlendingPy_SRCS} AppSurface.cpp - PreCompiled.cpp PreCompiled.h FeatureExtend.cpp FeatureExtend.h @@ -46,13 +45,14 @@ SET(Surface_SRCS FeatureCut.h ) +add_library(Surface SHARED ${Surface_SRCS}) + if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${Surface_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(Surface PreCompiled.h PreCompiled.cpp PCH_SRCS) + target_precompile_headers(Surface PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) endif(FREECAD_USE_PCH) -add_library(Surface SHARED ${Surface_SRCS}) target_include_directories( Surface PRIVATE diff --git a/src/Mod/Surface/App/FeatureCut.cpp b/src/Mod/Surface/App/FeatureCut.cpp index e39a0cadce..fb1c79e9d7 100644 --- a/src/Mod/Surface/App/FeatureCut.cpp +++ b/src/Mod/Surface/App/FeatureCut.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include "FeatureCut.h" diff --git a/src/Mod/Surface/App/FeatureExtend.cpp b/src/Mod/Surface/App/FeatureExtend.cpp index 24c83fcc34..4fcac1f881 100644 --- a/src/Mod/Surface/App/FeatureExtend.cpp +++ b/src/Mod/Surface/App/FeatureExtend.cpp @@ -20,8 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + #include #include #include @@ -33,8 +33,6 @@ #include #include #include -#include -#endif #include diff --git a/src/Mod/Surface/App/FeatureFilling.cpp b/src/Mod/Surface/App/FeatureFilling.cpp index 0462603745..ce9ffa920e 100644 --- a/src/Mod/Surface/App/FeatureFilling.cpp +++ b/src/Mod/Surface/App/FeatureFilling.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include @@ -30,7 +28,6 @@ #include #include #include -#endif #include "FeatureFilling.h" diff --git a/src/Mod/Surface/App/FeatureGeomFillSurface.cpp b/src/Mod/Surface/App/FeatureGeomFillSurface.cpp index 8eec4968d0..1f2a907442 100644 --- a/src/Mod/Surface/App/FeatureGeomFillSurface.cpp +++ b/src/Mod/Surface/App/FeatureGeomFillSurface.cpp @@ -21,9 +21,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -47,7 +45,7 @@ #include #include #include -#endif + #include "FeatureGeomFillSurface.h" diff --git a/src/Mod/Surface/App/FeatureSections.cpp b/src/Mod/Surface/App/FeatureSections.cpp index cd18b80eb8..36a5b652fa 100644 --- a/src/Mod/Surface/App/FeatureSections.cpp +++ b/src/Mod/Surface/App/FeatureSections.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -31,7 +29,7 @@ #include #include #include -#endif + #include "FeatureSections.h" diff --git a/src/Mod/Surface/App/FeatureSewing.cpp b/src/Mod/Surface/App/FeatureSewing.cpp index 2c821b9fb3..061d942995 100644 --- a/src/Mod/Surface/App/FeatureSewing.cpp +++ b/src/Mod/Surface/App/FeatureSewing.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif + #include "FeatureSewing.h" diff --git a/src/Mod/Surface/App/PreCompiled.cpp b/src/Mod/Surface/App/PreCompiled.cpp deleted file mode 100644 index a6ded796a3..0000000000 --- a/src/Mod/Surface/App/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2014 Nathan Miller * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/Surface/App/PreCompiled.h b/src/Mod/Surface/App/PreCompiled.h index 0d80e1fe47..24224bf263 100644 --- a/src/Mod/Surface/App/PreCompiled.h +++ b/src/Mod/Surface/App/PreCompiled.h @@ -25,14 +25,10 @@ #include -#ifdef _PreComp_ - // STL #include // opencascade #include -#endif //_PreComp_ - #endif diff --git a/src/Mod/Surface/Gui/AppSurfaceGui.cpp b/src/Mod/Surface/Gui/AppSurfaceGui.cpp index 71f5155740..4a83802a1a 100644 --- a/src/Mod/Surface/Gui/AppSurfaceGui.cpp +++ b/src/Mod/Surface/Gui/AppSurfaceGui.cpp @@ -21,7 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Surface/Gui/Blending/TaskBlendCurve.cpp b/src/Mod/Surface/Gui/Blending/TaskBlendCurve.cpp index 474802b3ce..d89787e9e3 100644 --- a/src/Mod/Surface/Gui/Blending/TaskBlendCurve.cpp +++ b/src/Mod/Surface/Gui/Blending/TaskBlendCurve.cpp @@ -19,13 +19,10 @@ * * **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include -#endif #include #include diff --git a/src/Mod/Surface/Gui/Blending/ViewProviderBlendCurve.cpp b/src/Mod/Surface/Gui/Blending/ViewProviderBlendCurve.cpp index 51bf3c159d..6f9c66bcd1 100644 --- a/src/Mod/Surface/Gui/Blending/ViewProviderBlendCurve.cpp +++ b/src/Mod/Surface/Gui/Blending/ViewProviderBlendCurve.cpp @@ -20,10 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif #include "ViewProviderBlendCurve.h" #include "TaskBlendCurve.h" diff --git a/src/Mod/Surface/Gui/CMakeLists.txt b/src/Mod/Surface/Gui/CMakeLists.txt index c2263358fc..515a304575 100644 --- a/src/Mod/Surface/Gui/CMakeLists.txt +++ b/src/Mod/Surface/Gui/CMakeLists.txt @@ -38,7 +38,6 @@ SET(SurfaceGui_SRCS TaskSections.h AppSurfaceGui.cpp Command.cpp - PreCompiled.cpp PreCompiled.h ViewProviderExtend.cpp ViewProviderExtend.h @@ -52,17 +51,17 @@ SET(SurfaceGuiIcon_SVG Resources/icons/Surface_Workbench.svg ) -if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${SurfaceGui_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(SurfaceGui PreCompiled.h PreCompiled.cpp PCH_SRCS) -endif(FREECAD_USE_PCH) - add_library(SurfaceGui SHARED ${SurfaceGui_SRCS} ${SurfaceGuiIcon_SVG} ) +if(FREECAD_USE_PCH) + target_precompile_headers(SurfaceGui PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_include_directories( SurfaceGui PRIVATE diff --git a/src/Mod/Surface/Gui/Command.cpp b/src/Mod/Surface/Gui/Command.cpp index 8c9422155e..3ff5139e74 100644 --- a/src/Mod/Surface/Gui/Command.cpp +++ b/src/Mod/Surface/Gui/Command.cpp @@ -21,8 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -31,7 +29,6 @@ #include #include #include -#endif #include "Mod/Part/App/PartFeature.h" #include diff --git a/src/Mod/Surface/Gui/PreCompiled.cpp b/src/Mod/Surface/Gui/PreCompiled.cpp deleted file mode 100644 index a6ded796a3..0000000000 --- a/src/Mod/Surface/Gui/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2014 Nathan Miller * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/Surface/Gui/PreCompiled.h b/src/Mod/Surface/Gui/PreCompiled.h index e29d145fdc..f0b43e2bec 100644 --- a/src/Mod/Surface/Gui/PreCompiled.h +++ b/src/Mod/Surface/Gui/PreCompiled.h @@ -25,8 +25,6 @@ #include -#ifdef _PreComp_ - // STL #include @@ -48,6 +46,4 @@ #include #include -#endif //_PreComp_ - #endif // GUI_PRECOMPILED_H diff --git a/src/Mod/Surface/Gui/TaskFilling.cpp b/src/Mod/Surface/Gui/TaskFilling.cpp index 56dd99970b..94aa2437d6 100644 --- a/src/Mod/Surface/Gui/TaskFilling.cpp +++ b/src/Mod/Surface/Gui/TaskFilling.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -32,7 +30,6 @@ #include #include #include -#endif #include #include diff --git a/src/Mod/Surface/Gui/TaskFillingEdge.cpp b/src/Mod/Surface/Gui/TaskFillingEdge.cpp index 6030eaca47..06232670e4 100644 --- a/src/Mod/Surface/Gui/TaskFillingEdge.cpp +++ b/src/Mod/Surface/Gui/TaskFillingEdge.cpp @@ -21,8 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -32,7 +30,6 @@ #include #include #include -#endif #include #include diff --git a/src/Mod/Surface/Gui/TaskFillingVertex.cpp b/src/Mod/Surface/Gui/TaskFillingVertex.cpp index c684cc7dd4..c7fe86a465 100644 --- a/src/Mod/Surface/Gui/TaskFillingVertex.cpp +++ b/src/Mod/Surface/Gui/TaskFillingVertex.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp b/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp index 8a204a05ef..ccbb74a30d 100644 --- a/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp +++ b/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp @@ -21,15 +21,13 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include #include #include -#endif + #include #include diff --git a/src/Mod/Surface/Gui/TaskSections.cpp b/src/Mod/Surface/Gui/TaskSections.cpp index 7cbee3c0a8..3ef26c3af5 100644 --- a/src/Mod/Surface/Gui/TaskSections.cpp +++ b/src/Mod/Surface/Gui/TaskSections.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -29,7 +27,6 @@ #include #include -#endif #include #include diff --git a/src/Mod/Surface/Gui/ViewProviderExtend.cpp b/src/Mod/Surface/Gui/ViewProviderExtend.cpp index 6a5ef3b175..1449d2f60c 100644 --- a/src/Mod/Surface/Gui/ViewProviderExtend.cpp +++ b/src/Mod/Surface/Gui/ViewProviderExtend.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/Surface/Gui/Workbench.cpp b/src/Mod/Surface/Gui/Workbench.cpp index 946efddce1..02e32248c3 100644 --- a/src/Mod/Surface/Gui/Workbench.cpp +++ b/src/Mod/Surface/Gui/Workbench.cpp @@ -21,7 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include From 5b6a0b18524b1b90e18ed0f428cee806b3a29883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sun, 21 Sep 2025 16:42:00 +0200 Subject: [PATCH 07/17] PartDesign: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- src/Mod/PartDesign/App/AppPartDesign.cpp | 1 - src/Mod/PartDesign/App/AppPartDesignPy.cpp | 1 - src/Mod/PartDesign/App/Body.cpp | 1 - src/Mod/PartDesign/App/BodyPyImp.cpp | 1 - src/Mod/PartDesign/App/CMakeLists.txt | 7 +++--- src/Mod/PartDesign/App/DatumCS.cpp | 4 +--- src/Mod/PartDesign/App/DatumLine.cpp | 4 +--- src/Mod/PartDesign/App/DatumPlane.cpp | 4 +--- src/Mod/PartDesign/App/DatumPoint.cpp | 4 +--- src/Mod/PartDesign/App/Feature.cpp | 4 +--- src/Mod/PartDesign/App/FeatureAddSub.cpp | 4 +--- src/Mod/PartDesign/App/FeatureBase.cpp | 4 +--- src/Mod/PartDesign/App/FeatureBoolean.cpp | 4 +--- src/Mod/PartDesign/App/FeatureChamfer.cpp | 5 +--- src/Mod/PartDesign/App/FeatureDraft.cpp | 4 +--- src/Mod/PartDesign/App/FeatureDressUp.cpp | 4 +--- src/Mod/PartDesign/App/FeatureExtrude.cpp | 4 ---- src/Mod/PartDesign/App/FeatureFillet.cpp | 5 +--- src/Mod/PartDesign/App/FeatureGroove.cpp | 4 +--- src/Mod/PartDesign/App/FeatureHelix.cpp | 4 ---- src/Mod/PartDesign/App/FeatureHole.cpp | 5 +--- .../PartDesign/App/FeatureLinearPattern.cpp | 5 +--- src/Mod/PartDesign/App/FeatureLoft.cpp | 7 +----- src/Mod/PartDesign/App/FeatureMirrored.cpp | 4 +--- .../PartDesign/App/FeatureMultiTransform.cpp | 4 +--- src/Mod/PartDesign/App/FeaturePad.cpp | 4 +--- src/Mod/PartDesign/App/FeaturePipe.cpp | 4 +--- src/Mod/PartDesign/App/FeaturePocket.cpp | 4 +--- .../PartDesign/App/FeaturePolarPattern.cpp | 5 +--- src/Mod/PartDesign/App/FeaturePrimitive.cpp | 5 +--- src/Mod/PartDesign/App/FeaturePyImp.cpp | 1 - src/Mod/PartDesign/App/FeatureRefine.cpp | 4 ---- src/Mod/PartDesign/App/FeatureRevolution.cpp | 4 +--- src/Mod/PartDesign/App/FeatureScaled.cpp | 4 +--- src/Mod/PartDesign/App/FeatureSketchBased.cpp | 4 +--- src/Mod/PartDesign/App/FeatureSolid.cpp | 1 - src/Mod/PartDesign/App/FeatureThickness.cpp | 4 +--- src/Mod/PartDesign/App/FeatureTransformed.cpp | 4 +--- src/Mod/PartDesign/App/Measure.cpp | 1 - src/Mod/PartDesign/App/PreCompiled.cpp | 24 ------------------- src/Mod/PartDesign/App/PreCompiled.h | 3 --- src/Mod/PartDesign/App/ShapeBinder.cpp | 4 +--- src/Mod/PartDesign/Gui/AppPartDesignGui.cpp | 1 - src/Mod/PartDesign/Gui/CMakeLists.txt | 15 ++++++------ src/Mod/PartDesign/Gui/Command.cpp | 4 +--- src/Mod/PartDesign/Gui/CommandBody.cpp | 4 +--- src/Mod/PartDesign/Gui/CommandPrimitive.cpp | 4 +--- src/Mod/PartDesign/Gui/DlgActiveBody.cpp | 4 +--- src/Mod/PartDesign/Gui/PreCompiled.cpp | 24 ------------------- src/Mod/PartDesign/Gui/PreCompiled.h | 3 --- src/Mod/PartDesign/Gui/ReferenceSelection.cpp | 4 +--- src/Mod/PartDesign/Gui/SketchWorkflow.cpp | 4 +--- .../PartDesign/Gui/TaskBooleanParameters.cpp | 4 +--- .../PartDesign/Gui/TaskChamferParameters.cpp | 4 ---- .../PartDesign/Gui/TaskDatumParameters.cpp | 4 +--- .../PartDesign/Gui/TaskDraftParameters.cpp | 4 +--- .../PartDesign/Gui/TaskDressUpParameters.cpp | 4 +--- .../PartDesign/Gui/TaskExtrudeParameters.cpp | 4 +--- .../PartDesign/Gui/TaskFeatureParameters.cpp | 4 +--- src/Mod/PartDesign/Gui/TaskFeaturePick.cpp | 4 +--- .../PartDesign/Gui/TaskFilletParameters.cpp | 4 +--- .../PartDesign/Gui/TaskHelixParameters.cpp | 1 - src/Mod/PartDesign/Gui/TaskHoleParameters.cpp | 1 - src/Mod/PartDesign/Gui/TaskLoftParameters.cpp | 4 +--- .../PartDesign/Gui/TaskMirroredParameters.cpp | 4 +--- .../Gui/TaskMultiTransformParameters.cpp | 4 +--- src/Mod/PartDesign/Gui/TaskPadParameters.cpp | 4 +--- .../PartDesign/Gui/TaskPatternParameters.cpp | 4 ---- src/Mod/PartDesign/Gui/TaskPipeParameters.cpp | 4 +--- .../PartDesign/Gui/TaskPocketParameters.cpp | 4 +--- .../Gui/TaskPrimitiveParameters.cpp | 6 +---- .../Gui/TaskRevolutionParameters.cpp | 6 ++--- .../PartDesign/Gui/TaskScaledParameters.cpp | 5 ---- src/Mod/PartDesign/Gui/TaskShapeBinder.cpp | 4 +--- .../Gui/TaskSketchBasedParameters.cpp | 4 +--- .../Gui/TaskThicknessParameters.cpp | 4 +--- .../Gui/TaskTransformedMessages.cpp | 1 - .../Gui/TaskTransformedParameters.cpp | 4 +--- src/Mod/PartDesign/Gui/Utils.cpp | 4 +--- src/Mod/PartDesign/Gui/ViewProvider.cpp | 5 ---- src/Mod/PartDesign/Gui/ViewProviderBase.cpp | 1 - src/Mod/PartDesign/Gui/ViewProviderBody.cpp | 4 +--- .../PartDesign/Gui/ViewProviderBoolean.cpp | 5 ---- .../PartDesign/Gui/ViewProviderChamfer.cpp | 1 - src/Mod/PartDesign/Gui/ViewProviderDatum.cpp | 4 +--- .../PartDesign/Gui/ViewProviderDatumCS.cpp | 6 +---- .../PartDesign/Gui/ViewProviderDatumLine.cpp | 4 +--- .../PartDesign/Gui/ViewProviderDatumPlane.cpp | 4 +--- .../PartDesign/Gui/ViewProviderDatumPoint.cpp | 4 +--- src/Mod/PartDesign/Gui/ViewProviderDraft.cpp | 1 - .../PartDesign/Gui/ViewProviderDressUp.cpp | 4 +--- .../PartDesign/Gui/ViewProviderExtrude.cpp | 4 +--- src/Mod/PartDesign/Gui/ViewProviderFillet.cpp | 1 - src/Mod/PartDesign/Gui/ViewProviderGroove.cpp | 4 +--- src/Mod/PartDesign/Gui/ViewProviderHelix.cpp | 4 +--- src/Mod/PartDesign/Gui/ViewProviderHole.cpp | 4 +--- .../Gui/ViewProviderLinearPattern.cpp | 1 - src/Mod/PartDesign/Gui/ViewProviderLoft.cpp | 4 +--- .../PartDesign/Gui/ViewProviderMainPart.cpp | 1 - .../PartDesign/Gui/ViewProviderMirrored.cpp | 1 - .../Gui/ViewProviderMultiTransform.cpp | 1 - src/Mod/PartDesign/Gui/ViewProviderPad.cpp | 4 +--- src/Mod/PartDesign/Gui/ViewProviderPipe.cpp | 4 +--- src/Mod/PartDesign/Gui/ViewProviderPocket.cpp | 4 +--- .../Gui/ViewProviderPolarPattern.cpp | 1 - .../PartDesign/Gui/ViewProviderPrimitive.cpp | 4 +--- src/Mod/PartDesign/Gui/ViewProviderPyImp.cpp | 1 - .../PartDesign/Gui/ViewProviderRevolution.cpp | 4 +--- src/Mod/PartDesign/Gui/ViewProviderScaled.cpp | 1 - .../Gui/ViewProviderShapeBinder.cpp | 4 +--- .../Gui/ViewProviderSketchBased.cpp | 5 ---- .../PartDesign/Gui/ViewProviderThickness.cpp | 1 - .../Gui/ViewProviderTransformed.cpp | 4 +--- src/Mod/PartDesign/Gui/Workbench.cpp | 1 - src/Mod/PartDesign/Gui/WorkflowManager.cpp | 4 +--- 115 files changed, 87 insertions(+), 372 deletions(-) delete mode 100644 src/Mod/PartDesign/App/PreCompiled.cpp delete mode 100644 src/Mod/PartDesign/Gui/PreCompiled.cpp diff --git a/src/Mod/PartDesign/App/AppPartDesign.cpp b/src/Mod/PartDesign/App/AppPartDesign.cpp index fcb4eb2cc9..94c18d0ae4 100644 --- a/src/Mod/PartDesign/App/AppPartDesign.cpp +++ b/src/Mod/PartDesign/App/AppPartDesign.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/PartDesign/App/AppPartDesignPy.cpp b/src/Mod/PartDesign/App/AppPartDesignPy.cpp index f47740db2e..52b4e51d48 100644 --- a/src/Mod/PartDesign/App/AppPartDesignPy.cpp +++ b/src/Mod/PartDesign/App/AppPartDesignPy.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/PartDesign/App/Body.cpp b/src/Mod/PartDesign/App/Body.cpp index 1ede7388f8..b46d0e545d 100644 --- a/src/Mod/PartDesign/App/Body.cpp +++ b/src/Mod/PartDesign/App/Body.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/PartDesign/App/BodyPyImp.cpp b/src/Mod/PartDesign/App/BodyPyImp.cpp index beb77a62f7..e30ad10f54 100644 --- a/src/Mod/PartDesign/App/BodyPyImp.cpp +++ b/src/Mod/PartDesign/App/BodyPyImp.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "Mod/PartDesign/App/Body.h" #include "Mod/PartDesign/App/Feature.h" diff --git a/src/Mod/PartDesign/App/CMakeLists.txt b/src/Mod/PartDesign/App/CMakeLists.txt index 0eb3e12334..a24f4a7f82 100644 --- a/src/Mod/PartDesign/App/CMakeLists.txt +++ b/src/Mod/PartDesign/App/CMakeLists.txt @@ -106,7 +106,6 @@ SOURCE_GROUP("SketchBasedFeatures" FILES ${FeaturesSketchBased_SRCS}) SET(Module_SRCS AppPartDesign.cpp AppPartDesignPy.cpp - PreCompiled.cpp PreCompiled.h Measure.cpp Measure.h @@ -154,9 +153,9 @@ if (FREECAD_WARN_ERROR) endif() if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PartDesign_CPP_SRCS ${PartDesign_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(PartDesign PreCompiled.h PreCompiled.cpp PartDesign_CPP_SRCS) + target_precompile_headers(PartDesign PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) endif(FREECAD_USE_PCH) SET_BIN_DIR(PartDesign _PartDesign /Mod/PartDesign) diff --git a/src/Mod/PartDesign/App/DatumCS.cpp b/src/Mod/PartDesign/App/DatumCS.cpp index 204f8cd8e4..198a7236a5 100644 --- a/src/Mod/PartDesign/App/DatumCS.cpp +++ b/src/Mod/PartDesign/App/DatumCS.cpp @@ -21,12 +21,10 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/App/DatumLine.cpp b/src/Mod/PartDesign/App/DatumLine.cpp index e0ab4a8914..e14818f904 100644 --- a/src/Mod/PartDesign/App/DatumLine.cpp +++ b/src/Mod/PartDesign/App/DatumLine.cpp @@ -22,13 +22,11 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include "DatumLine.h" diff --git a/src/Mod/PartDesign/App/DatumPlane.cpp b/src/Mod/PartDesign/App/DatumPlane.cpp index cd9f6a30a9..183a41024a 100644 --- a/src/Mod/PartDesign/App/DatumPlane.cpp +++ b/src/Mod/PartDesign/App/DatumPlane.cpp @@ -22,13 +22,11 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include "DatumPlane.h" diff --git a/src/Mod/PartDesign/App/DatumPoint.cpp b/src/Mod/PartDesign/App/DatumPoint.cpp index 0bfee2c1ad..68dbdbc3f6 100644 --- a/src/Mod/PartDesign/App/DatumPoint.cpp +++ b/src/Mod/PartDesign/App/DatumPoint.cpp @@ -22,11 +22,9 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include "DatumPoint.h" diff --git a/src/Mod/PartDesign/App/Feature.cpp b/src/Mod/PartDesign/App/Feature.cpp index cc8653067d..322ea7a568 100644 --- a/src/Mod/PartDesign/App/Feature.cpp +++ b/src/Mod/PartDesign/App/Feature.cpp @@ -21,8 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -30,7 +28,7 @@ # include # include # include -#endif + #include "App/Datums.h" #include diff --git a/src/Mod/PartDesign/App/FeatureAddSub.cpp b/src/Mod/PartDesign/App/FeatureAddSub.cpp index 2094160a92..aedc29c490 100644 --- a/src/Mod/PartDesign/App/FeatureAddSub.cpp +++ b/src/Mod/PartDesign/App/FeatureAddSub.cpp @@ -21,10 +21,8 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/PartDesign/App/FeatureBase.cpp b/src/Mod/PartDesign/App/FeatureBase.cpp index 996a6a5115..e6c063a6ff 100644 --- a/src/Mod/PartDesign/App/FeatureBase.cpp +++ b/src/Mod/PartDesign/App/FeatureBase.cpp @@ -21,10 +21,8 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include "Body.h" diff --git a/src/Mod/PartDesign/App/FeatureBoolean.cpp b/src/Mod/PartDesign/App/FeatureBoolean.cpp index 9d169c6449..abd0a106f5 100644 --- a/src/Mod/PartDesign/App/FeatureBoolean.cpp +++ b/src/Mod/PartDesign/App/FeatureBoolean.cpp @@ -21,13 +21,11 @@ ******************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/App/FeatureChamfer.cpp b/src/Mod/PartDesign/App/FeatureChamfer.cpp index 493df5d9c5..c084c96678 100644 --- a/src/Mod/PartDesign/App/FeatureChamfer.cpp +++ b/src/Mod/PartDesign/App/FeatureChamfer.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include @@ -35,7 +32,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/App/FeatureDraft.cpp b/src/Mod/PartDesign/App/FeatureDraft.cpp index d8f2c7e9b3..b94a17b78f 100644 --- a/src/Mod/PartDesign/App/FeatureDraft.cpp +++ b/src/Mod/PartDesign/App/FeatureDraft.cpp @@ -22,8 +22,6 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -40,7 +38,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/App/FeatureDressUp.cpp b/src/Mod/PartDesign/App/FeatureDressUp.cpp index 4eafd6a7d0..78710f81aa 100644 --- a/src/Mod/PartDesign/App/FeatureDressUp.cpp +++ b/src/Mod/PartDesign/App/FeatureDressUp.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -30,7 +28,7 @@ #include #include #include -#endif + #include diff --git a/src/Mod/PartDesign/App/FeatureExtrude.cpp b/src/Mod/PartDesign/App/FeatureExtrude.cpp index 5059124ee3..78bdd6164e 100644 --- a/src/Mod/PartDesign/App/FeatureExtrude.cpp +++ b/src/Mod/PartDesign/App/FeatureExtrude.cpp @@ -21,9 +21,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -36,7 +33,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/PartDesign/App/FeatureFillet.cpp b/src/Mod/PartDesign/App/FeatureFillet.cpp index 7195912bc6..e3755c3c73 100644 --- a/src/Mod/PartDesign/App/FeatureFillet.cpp +++ b/src/Mod/PartDesign/App/FeatureFillet.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ # include + # include # include # include @@ -31,7 +29,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/PartDesign/App/FeatureGroove.cpp b/src/Mod/PartDesign/App/FeatureGroove.cpp index 09187d80f9..d9b1f57167 100644 --- a/src/Mod/PartDesign/App/FeatureGroove.cpp +++ b/src/Mod/PartDesign/App/FeatureGroove.cpp @@ -21,8 +21,6 @@ ******************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -30,7 +28,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/App/FeatureHelix.cpp b/src/Mod/PartDesign/App/FeatureHelix.cpp index dee2162a93..8b3d807b84 100644 --- a/src/Mod/PartDesign/App/FeatureHelix.cpp +++ b/src/Mod/PartDesign/App/FeatureHelix.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -43,7 +40,6 @@ # include # include # include -#endif # include # include diff --git a/src/Mod/PartDesign/App/FeatureHole.cpp b/src/Mod/PartDesign/App/FeatureHole.cpp index 55f549a74a..9c886a64c2 100644 --- a/src/Mod/PartDesign/App/FeatureHole.cpp +++ b/src/Mod/PartDesign/App/FeatureHole.cpp @@ -21,8 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -49,7 +47,6 @@ # include # include # include -#endif #include #include @@ -2278,7 +2275,7 @@ Base::Vector3d Hole::guessNormalDirection(const TopoShape& profileshape) const // the middle of the face if (profileshape.hasSubShape(TopAbs_FACE)) { BRepAdaptor_Surface sf(TopoDS::Face(profileshape.getSubShape(TopAbs_FACE, 1))); - + if (sf.GetType() == GeomAbs_Cylinder) { return Base::convertTo(sf.Cylinder().Axis().Direction()); } diff --git a/src/Mod/PartDesign/App/FeatureLinearPattern.cpp b/src/Mod/PartDesign/App/FeatureLinearPattern.cpp index 52c7639dff..7a0aaaf318 100644 --- a/src/Mod/PartDesign/App/FeatureLinearPattern.cpp +++ b/src/Mod/PartDesign/App/FeatureLinearPattern.cpp @@ -20,10 +20,8 @@ * * ******************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ # include + # include # include # include @@ -31,7 +29,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/PartDesign/App/FeatureLoft.cpp b/src/Mod/PartDesign/App/FeatureLoft.cpp index a37dbfd7d9..c59945d831 100644 --- a/src/Mod/PartDesign/App/FeatureLoft.cpp +++ b/src/Mod/PartDesign/App/FeatureLoft.cpp @@ -20,16 +20,11 @@ * * ***************************************************************************/ - - -// NOLINTNEXTLINE(CppUnusedIncludeDirective) -#include "PreCompiled.h" // NOLINT(misc-include-cleaner) -#ifndef _PreComp_ # include # include # include # include -#endif + #include diff --git a/src/Mod/PartDesign/App/FeatureMirrored.cpp b/src/Mod/PartDesign/App/FeatureMirrored.cpp index f9c530bf98..c5a82f1521 100644 --- a/src/Mod/PartDesign/App/FeatureMirrored.cpp +++ b/src/Mod/PartDesign/App/FeatureMirrored.cpp @@ -21,14 +21,12 @@ ******************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/App/FeatureMultiTransform.cpp b/src/Mod/PartDesign/App/FeatureMultiTransform.cpp index 8c84596cc0..a6dade0d6e 100644 --- a/src/Mod/PartDesign/App/FeatureMultiTransform.cpp +++ b/src/Mod/PartDesign/App/FeatureMultiTransform.cpp @@ -21,12 +21,10 @@ ******************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif + #include "FeatureMultiTransform.h" #include "FeatureAddSub.h" diff --git a/src/Mod/PartDesign/App/FeaturePad.cpp b/src/Mod/PartDesign/App/FeaturePad.cpp index 687d4a5a54..5fcb6d2c20 100644 --- a/src/Mod/PartDesign/App/FeaturePad.cpp +++ b/src/Mod/PartDesign/App/FeaturePad.cpp @@ -21,14 +21,12 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/App/FeaturePipe.cpp b/src/Mod/PartDesign/App/FeaturePipe.cpp index 2bcfb0dc70..b31b8fac14 100644 --- a/src/Mod/PartDesign/App/FeaturePipe.cpp +++ b/src/Mod/PartDesign/App/FeaturePipe.cpp @@ -21,8 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -40,7 +38,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/App/FeaturePocket.cpp b/src/Mod/PartDesign/App/FeaturePocket.cpp index dec195a155..d4bb07b9fd 100644 --- a/src/Mod/PartDesign/App/FeaturePocket.cpp +++ b/src/Mod/PartDesign/App/FeaturePocket.cpp @@ -21,14 +21,12 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/App/FeaturePolarPattern.cpp b/src/Mod/PartDesign/App/FeaturePolarPattern.cpp index f660a134cc..79077a09e1 100644 --- a/src/Mod/PartDesign/App/FeaturePolarPattern.cpp +++ b/src/Mod/PartDesign/App/FeaturePolarPattern.cpp @@ -20,17 +20,14 @@ * * ******************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ # include + # include # include # include # include # include # include -#endif #include "DatumLine.h" #include diff --git a/src/Mod/PartDesign/App/FeaturePrimitive.cpp b/src/Mod/PartDesign/App/FeaturePrimitive.cpp index 51d8a0c560..cf7f9e96df 100644 --- a/src/Mod/PartDesign/App/FeaturePrimitive.cpp +++ b/src/Mod/PartDesign/App/FeaturePrimitive.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ # include + # include # include # include @@ -37,7 +35,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/PartDesign/App/FeaturePyImp.cpp b/src/Mod/PartDesign/App/FeaturePyImp.cpp index d010a57c0b..93139fb22c 100644 --- a/src/Mod/PartDesign/App/FeaturePyImp.cpp +++ b/src/Mod/PartDesign/App/FeaturePyImp.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" // inclusion of the generated files (generated out of FeaturePy.xml) #include "FeaturePy.h" diff --git a/src/Mod/PartDesign/App/FeatureRefine.cpp b/src/Mod/PartDesign/App/FeatureRefine.cpp index 1fa9d87160..3c25ec7568 100644 --- a/src/Mod/PartDesign/App/FeatureRefine.cpp +++ b/src/Mod/PartDesign/App/FeatureRefine.cpp @@ -21,11 +21,7 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif #include #include diff --git a/src/Mod/PartDesign/App/FeatureRevolution.cpp b/src/Mod/PartDesign/App/FeatureRevolution.cpp index 62ead5d6ef..62e516fb4c 100644 --- a/src/Mod/PartDesign/App/FeatureRevolution.cpp +++ b/src/Mod/PartDesign/App/FeatureRevolution.cpp @@ -21,8 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -30,7 +28,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/App/FeatureScaled.cpp b/src/Mod/PartDesign/App/FeatureScaled.cpp index 3a85ee4a8a..eb2ecf02e0 100644 --- a/src/Mod/PartDesign/App/FeatureScaled.cpp +++ b/src/Mod/PartDesign/App/FeatureScaled.cpp @@ -21,12 +21,10 @@ ******************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif + #include "FeatureScaled.h" #include "FeatureAddSub.h" diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp index 01b69d9e1c..438a548781 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp +++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -50,7 +48,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/App/FeatureSolid.cpp b/src/Mod/PartDesign/App/FeatureSolid.cpp index 72bb3f57af..af9f2cc8a4 100644 --- a/src/Mod/PartDesign/App/FeatureSolid.cpp +++ b/src/Mod/PartDesign/App/FeatureSolid.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "FeatureSolid.h" diff --git a/src/Mod/PartDesign/App/FeatureThickness.cpp b/src/Mod/PartDesign/App/FeatureThickness.cpp index 7be41c2ded..287b7e78e8 100644 --- a/src/Mod/PartDesign/App/FeatureThickness.cpp +++ b/src/Mod/PartDesign/App/FeatureThickness.cpp @@ -24,11 +24,9 @@ #include #include -#include "PreCompiled.h" // NOLINT -#ifndef _PreComp_ # include # include -#endif + #include #include "FeatureThickness.h" diff --git a/src/Mod/PartDesign/App/FeatureTransformed.cpp b/src/Mod/PartDesign/App/FeatureTransformed.cpp index de24d2af42..93c827bfa1 100644 --- a/src/Mod/PartDesign/App/FeatureTransformed.cpp +++ b/src/Mod/PartDesign/App/FeatureTransformed.cpp @@ -20,8 +20,6 @@ * * ******************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -31,7 +29,7 @@ #include #include #include -#endif + #include diff --git a/src/Mod/PartDesign/App/Measure.cpp b/src/Mod/PartDesign/App/Measure.cpp index 5c4865b94d..fcbab6fe19 100644 --- a/src/Mod/PartDesign/App/Measure.cpp +++ b/src/Mod/PartDesign/App/Measure.cpp @@ -20,7 +20,6 @@ **************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/PartDesign/App/PreCompiled.cpp b/src/Mod/PartDesign/App/PreCompiled.cpp deleted file mode 100644 index 7cd1cae80f..0000000000 --- a/src/Mod/PartDesign/App/PreCompiled.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2008 Jürgen Riegel * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" diff --git a/src/Mod/PartDesign/App/PreCompiled.h b/src/Mod/PartDesign/App/PreCompiled.h index 0498d94641..f29dcb061e 100644 --- a/src/Mod/PartDesign/App/PreCompiled.h +++ b/src/Mod/PartDesign/App/PreCompiled.h @@ -25,14 +25,11 @@ #include -#ifdef _PreComp_ - // stl #include // OpenCasCade #include -#endif // _PreComp_ #endif diff --git a/src/Mod/PartDesign/App/ShapeBinder.cpp b/src/Mod/PartDesign/App/ShapeBinder.cpp index a34f94640b..2812a33bc6 100644 --- a/src/Mod/PartDesign/App/ShapeBinder.cpp +++ b/src/Mod/PartDesign/App/ShapeBinder.cpp @@ -21,15 +21,13 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/AppPartDesignGui.cpp b/src/Mod/PartDesign/Gui/AppPartDesignGui.cpp index 8c69705965..769ea9f96d 100644 --- a/src/Mod/PartDesign/Gui/AppPartDesignGui.cpp +++ b/src/Mod/PartDesign/Gui/AppPartDesignGui.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/PartDesign/Gui/CMakeLists.txt b/src/Mod/PartDesign/Gui/CMakeLists.txt index 87e31e22ee..db66d845b6 100644 --- a/src/Mod/PartDesign/Gui/CMakeLists.txt +++ b/src/Mod/PartDesign/Gui/CMakeLists.txt @@ -203,7 +203,6 @@ SET(PartDesignGuiModule_SRCS CommandBody.cpp EnumFlags.h Resources/PartDesign.qrc - PreCompiled.cpp PreCompiled.h SketchWorkflow.cpp SketchWorkflow.h @@ -234,18 +233,18 @@ SET(PartDesignGui_SRCS ${Python_SRCS} ) -if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${PartDesignGui_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(PartDesignGui PreCompiled.h PreCompiled.cpp PCH_SRCS) -endif(FREECAD_USE_PCH) - - SET(PartDesignGuiIcon_SVG Resources/icons/PartDesignWorkbench.svg ) add_library(PartDesignGui SHARED ${PartDesignGui_SRCS} ${PartDesignGuiIcon_SVG}) + +if(FREECAD_USE_PCH) + target_precompile_headers(PartDesignGui PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_include_directories( PartDesignGui PRIVATE diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index 1f6f1ab260..f88fc1aa12 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -21,9 +21,7 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -32,7 +30,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/CommandBody.cpp b/src/Mod/PartDesign/Gui/CommandBody.cpp index 806c171fa9..c8ecfed725 100644 --- a/src/Mod/PartDesign/Gui/CommandBody.cpp +++ b/src/Mod/PartDesign/Gui/CommandBody.cpp @@ -20,14 +20,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/CommandPrimitive.cpp b/src/Mod/PartDesign/Gui/CommandPrimitive.cpp index 422b7bbd50..ea3877003e 100644 --- a/src/Mod/PartDesign/Gui/CommandPrimitive.cpp +++ b/src/Mod/PartDesign/Gui/CommandPrimitive.cpp @@ -21,12 +21,10 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/DlgActiveBody.cpp b/src/Mod/PartDesign/Gui/DlgActiveBody.cpp index 5b1aa81213..028ecc580b 100644 --- a/src/Mod/PartDesign/Gui/DlgActiveBody.cpp +++ b/src/Mod/PartDesign/Gui/DlgActiveBody.cpp @@ -23,10 +23,8 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/PreCompiled.cpp b/src/Mod/PartDesign/Gui/PreCompiled.cpp deleted file mode 100644 index 7cd1cae80f..0000000000 --- a/src/Mod/PartDesign/Gui/PreCompiled.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2008 Jürgen Riegel * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" diff --git a/src/Mod/PartDesign/Gui/PreCompiled.h b/src/Mod/PartDesign/Gui/PreCompiled.h index 2175ca393e..12375929e0 100644 --- a/src/Mod/PartDesign/Gui/PreCompiled.h +++ b/src/Mod/PartDesign/Gui/PreCompiled.h @@ -25,8 +25,6 @@ #include -#ifdef _PreComp_ - #ifdef FC_OS_WIN32 #include #endif @@ -57,5 +55,4 @@ // Inventor # include -#endif // _PreComp_ #endif // PART_DESIGN_PRECOMPILED_H diff --git a/src/Mod/PartDesign/Gui/ReferenceSelection.cpp b/src/Mod/PartDesign/Gui/ReferenceSelection.cpp index b818b64b39..011cf93dd7 100644 --- a/src/Mod/PartDesign/Gui/ReferenceSelection.cpp +++ b/src/Mod/PartDesign/Gui/ReferenceSelection.cpp @@ -20,16 +20,14 @@ * * ******************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/SketchWorkflow.cpp b/src/Mod/PartDesign/Gui/SketchWorkflow.cpp index c6cb9d0eec..074ffea2f8 100644 --- a/src/Mod/PartDesign/Gui/SketchWorkflow.cpp +++ b/src/Mod/PartDesign/Gui/SketchWorkflow.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -29,7 +27,7 @@ # include # include # include -#endif + #include "SketchWorkflow.h" #include "DlgActiveBody.h" diff --git a/src/Mod/PartDesign/Gui/TaskBooleanParameters.cpp b/src/Mod/PartDesign/Gui/TaskBooleanParameters.cpp index c1cb0ea8ce..937cfd02b5 100644 --- a/src/Mod/PartDesign/Gui/TaskBooleanParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskBooleanParameters.cpp @@ -22,12 +22,10 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp b/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp index 5b5842102b..5cf25cb205 100644 --- a/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp @@ -20,14 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ #include #include #include #include -#endif #include #include diff --git a/src/Mod/PartDesign/Gui/TaskDatumParameters.cpp b/src/Mod/PartDesign/Gui/TaskDatumParameters.cpp index 01fce8491e..5499041fbd 100644 --- a/src/Mod/PartDesign/Gui/TaskDatumParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskDatumParameters.cpp @@ -22,12 +22,10 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp b/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp index 63c22b1915..a619e8ff6a 100644 --- a/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp @@ -22,14 +22,12 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/TaskDressUpParameters.cpp b/src/Mod/PartDesign/Gui/TaskDressUpParameters.cpp index e2754199ea..533114735d 100644 --- a/src/Mod/PartDesign/Gui/TaskDressUpParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskDressUpParameters.cpp @@ -22,15 +22,13 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/TaskExtrudeParameters.cpp b/src/Mod/PartDesign/Gui/TaskExtrudeParameters.cpp index 6b50b0b4f7..c02ed45458 100644 --- a/src/Mod/PartDesign/Gui/TaskExtrudeParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskExtrudeParameters.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/TaskFeatureParameters.cpp b/src/Mod/PartDesign/Gui/TaskFeatureParameters.cpp index 718c9a34ac..daad074048 100644 --- a/src/Mod/PartDesign/Gui/TaskFeatureParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskFeatureParameters.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp b/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp index 945f4cf563..806c6f36fa 100644 --- a/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp +++ b/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp @@ -21,13 +21,11 @@ * * ******************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif + #include diff --git a/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp b/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp index d5f316e388..e77cd6004a 100644 --- a/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp @@ -21,13 +21,11 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp b/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp index a37ad10da8..438d984368 100644 --- a/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp @@ -21,7 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp b/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp index a585833ef0..a86954aeb1 100644 --- a/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/PartDesign/Gui/TaskLoftParameters.cpp b/src/Mod/PartDesign/Gui/TaskLoftParameters.cpp index 0ee80f2500..2a15021ab7 100644 --- a/src/Mod/PartDesign/Gui/TaskLoftParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskLoftParameters.cpp @@ -21,11 +21,9 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/TaskMirroredParameters.cpp b/src/Mod/PartDesign/Gui/TaskMirroredParameters.cpp index c0701c9178..9ec9740d86 100644 --- a/src/Mod/PartDesign/Gui/TaskMirroredParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskMirroredParameters.cpp @@ -21,11 +21,9 @@ ******************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/TaskMultiTransformParameters.cpp b/src/Mod/PartDesign/Gui/TaskMultiTransformParameters.cpp index e4e25ae351..22d1048e66 100644 --- a/src/Mod/PartDesign/Gui/TaskMultiTransformParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskMultiTransformParameters.cpp @@ -21,11 +21,9 @@ ******************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/TaskPadParameters.cpp b/src/Mod/PartDesign/Gui/TaskPadParameters.cpp index 174ca5e01b..14c8f56ea3 100644 --- a/src/Mod/PartDesign/Gui/TaskPadParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskPadParameters.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include diff --git a/src/Mod/PartDesign/Gui/TaskPatternParameters.cpp b/src/Mod/PartDesign/Gui/TaskPatternParameters.cpp index eb817f4014..4550f7fc1e 100644 --- a/src/Mod/PartDesign/Gui/TaskPatternParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskPatternParameters.cpp @@ -20,13 +20,9 @@ * * ******************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ #include #include #include -#endif #include #include diff --git a/src/Mod/PartDesign/Gui/TaskPipeParameters.cpp b/src/Mod/PartDesign/Gui/TaskPipeParameters.cpp index ac25d709b5..e1d124549f 100644 --- a/src/Mod/PartDesign/Gui/TaskPipeParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskPipeParameters.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/TaskPocketParameters.cpp b/src/Mod/PartDesign/Gui/TaskPocketParameters.cpp index 34fb370d52..2ccdf9f31d 100644 --- a/src/Mod/PartDesign/Gui/TaskPocketParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskPocketParameters.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include diff --git a/src/Mod/PartDesign/Gui/TaskPrimitiveParameters.cpp b/src/Mod/PartDesign/Gui/TaskPrimitiveParameters.cpp index e68eb48cda..2a95c704cd 100644 --- a/src/Mod/PartDesign/Gui/TaskPrimitiveParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskPrimitiveParameters.cpp @@ -20,13 +20,9 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - -#ifndef _PreComp_ #include + #include -#endif #include #include diff --git a/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp b/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp index 1e6955ba08..f7969f177d 100644 --- a/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - #include #include #include @@ -763,14 +761,14 @@ void TaskRevolutionParameters::setGizmoPositions() if (isGroove) { auto groove = getObject(); Part::TopoShape profile = groove->getProfileShape(); - + profile.getCenterOfGravity(profileCog); basePos = groove->Base.getValue(); axisDir = groove->Axis.getValue(); } else { auto revolution = getObject(); Part::TopoShape profile = revolution->getProfileShape(); - + profile.getCenterOfGravity(profileCog); basePos = revolution->Base.getValue(); axisDir = revolution->Axis.getValue(); diff --git a/src/Mod/PartDesign/Gui/TaskScaledParameters.cpp b/src/Mod/PartDesign/Gui/TaskScaledParameters.cpp index 0dfc4d4a5e..f6996fb076 100644 --- a/src/Mod/PartDesign/Gui/TaskScaledParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskScaledParameters.cpp @@ -20,12 +20,7 @@ * * ******************************************************************************/ - -#include "PreCompiled.h" - -#ifndef _PreComp_ #include -#endif #include #include diff --git a/src/Mod/PartDesign/Gui/TaskShapeBinder.cpp b/src/Mod/PartDesign/Gui/TaskShapeBinder.cpp index 30ca96bbed..85fc59ff44 100644 --- a/src/Mod/PartDesign/Gui/TaskShapeBinder.cpp +++ b/src/Mod/PartDesign/Gui/TaskShapeBinder.cpp @@ -21,13 +21,11 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.cpp b/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.cpp index 4bf62859b7..a52ec11896 100644 --- a/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.cpp @@ -22,13 +22,11 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp b/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp index 71cd9f35bd..ea79c95d9f 100644 --- a/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp @@ -21,13 +21,11 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/TaskTransformedMessages.cpp b/src/Mod/PartDesign/Gui/TaskTransformedMessages.cpp index fe8a91283f..2e94586687 100644 --- a/src/Mod/PartDesign/Gui/TaskTransformedMessages.cpp +++ b/src/Mod/PartDesign/Gui/TaskTransformedMessages.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/PartDesign/Gui/TaskTransformedParameters.cpp b/src/Mod/PartDesign/Gui/TaskTransformedParameters.cpp index 90d6bdd523..152deb1afc 100644 --- a/src/Mod/PartDesign/Gui/TaskTransformedParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskTransformedParameters.cpp @@ -20,12 +20,10 @@ * * ******************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/Utils.cpp b/src/Mod/PartDesign/Gui/Utils.cpp index ddcc45ab55..c395057800 100644 --- a/src/Mod/PartDesign/Gui/Utils.cpp +++ b/src/Mod/PartDesign/Gui/Utils.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProvider.cpp b/src/Mod/PartDesign/Gui/ViewProvider.cpp index 09e040a4f7..913483341d 100644 --- a/src/Mod/PartDesign/Gui/ViewProvider.cpp +++ b/src/Mod/PartDesign/Gui/ViewProvider.cpp @@ -20,17 +20,12 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - -#ifndef _PreComp_ # include # include # include # include # include # include -#endif #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderBase.cpp b/src/Mod/PartDesign/Gui/ViewProviderBase.cpp index 8ac591b363..2b548c7f78 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderBase.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderBase.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp index 5acb902665..993f8e8072 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp @@ -21,14 +21,12 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderBoolean.cpp b/src/Mod/PartDesign/Gui/ViewProviderBoolean.cpp index c6ad95eaa0..0f108afb3a 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderBoolean.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderBoolean.cpp @@ -22,13 +22,8 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - -#ifndef _PreComp_ # include # include -#endif #include "ViewProviderBoolean.h" diff --git a/src/Mod/PartDesign/Gui/ViewProviderChamfer.cpp b/src/Mod/PartDesign/Gui/ViewProviderChamfer.cpp index 58487b2c27..9a854f866d 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderChamfer.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderChamfer.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "TaskChamferParameters.h" #include "ViewProviderChamfer.h" diff --git a/src/Mod/PartDesign/Gui/ViewProviderDatum.cpp b/src/Mod/PartDesign/Gui/ViewProviderDatum.cpp index d6e3262a77..49ae11e8ff 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderDatum.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderDatum.cpp @@ -21,9 +21,7 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -38,7 +36,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderDatumCS.cpp b/src/Mod/PartDesign/Gui/ViewProviderDatumCS.cpp index 7e7d3ba87e..a0869a6c5d 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderDatumCS.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderDatumCS.cpp @@ -20,11 +20,8 @@ * * ***************************************************************************/ +#include -#include "PreCompiled.h" - -#ifndef _PreComp_ -# include # include # include # include @@ -34,7 +31,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderDatumLine.cpp b/src/Mod/PartDesign/Gui/ViewProviderDatumLine.cpp index 24f7d81562..7bf6ad4a4d 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderDatumLine.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderDatumLine.cpp @@ -21,12 +21,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderDatumPlane.cpp b/src/Mod/PartDesign/Gui/ViewProviderDatumPlane.cpp index 21ab64258d..791f78ce54 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderDatumPlane.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderDatumPlane.cpp @@ -22,12 +22,10 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderDatumPoint.cpp b/src/Mod/PartDesign/Gui/ViewProviderDatumPoint.cpp index 5951a6db9b..3735160391 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderDatumPoint.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderDatumPoint.cpp @@ -22,14 +22,12 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderDraft.cpp b/src/Mod/PartDesign/Gui/ViewProviderDraft.cpp index a9dac19d63..75449aaaa3 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderDraft.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderDraft.cpp @@ -22,7 +22,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "TaskDraftParameters.h" #include "ViewProviderDraft.h" diff --git a/src/Mod/PartDesign/Gui/ViewProviderDressUp.cpp b/src/Mod/PartDesign/Gui/ViewProviderDressUp.cpp index 8420adbf15..fd34e0ed5e 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderDressUp.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderDressUp.cpp @@ -22,15 +22,13 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderExtrude.cpp b/src/Mod/PartDesign/Gui/ViewProviderExtrude.cpp index 642b62de40..373c05d2f7 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderExtrude.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderExtrude.cpp @@ -21,11 +21,9 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderFillet.cpp b/src/Mod/PartDesign/Gui/ViewProviderFillet.cpp index 348dbcbc10..3a8a1ab715 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderFillet.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderFillet.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "TaskFilletParameters.h" #include "ViewProviderFillet.h" diff --git a/src/Mod/PartDesign/Gui/ViewProviderGroove.cpp b/src/Mod/PartDesign/Gui/ViewProviderGroove.cpp index d6d498406e..61fa6667d6 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderGroove.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderGroove.cpp @@ -21,11 +21,9 @@ ******************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include "TaskRevolutionParameters.h" #include "ViewProviderGroove.h" diff --git a/src/Mod/PartDesign/Gui/ViewProviderHelix.cpp b/src/Mod/PartDesign/Gui/ViewProviderHelix.cpp index 02590eade3..ede4ca0183 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderHelix.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderHelix.cpp @@ -21,12 +21,10 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderHole.cpp b/src/Mod/PartDesign/Gui/ViewProviderHole.cpp index 18e4790871..79346cb241 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderHole.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderHole.cpp @@ -21,12 +21,10 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderLinearPattern.cpp b/src/Mod/PartDesign/Gui/ViewProviderLinearPattern.cpp index d4e20fafbd..fe92ec7827 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderLinearPattern.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderLinearPattern.cpp @@ -21,7 +21,6 @@ ******************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderLinearPattern.h" #include "TaskPatternParameters.h" diff --git a/src/Mod/PartDesign/Gui/ViewProviderLoft.cpp b/src/Mod/PartDesign/Gui/ViewProviderLoft.cpp index cf2d5ea1b0..5c622a84af 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderLoft.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderLoft.cpp @@ -21,11 +21,9 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderMainPart.cpp b/src/Mod/PartDesign/Gui/ViewProviderMainPart.cpp index 9c2c1d25e4..448c1e6319 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderMainPart.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderMainPart.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderMainPart.h" #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderMirrored.cpp b/src/Mod/PartDesign/Gui/ViewProviderMirrored.cpp index 804a005923..a5c410fd40 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderMirrored.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderMirrored.cpp @@ -21,7 +21,6 @@ ******************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderMirrored.h" #include "TaskMirroredParameters.h" diff --git a/src/Mod/PartDesign/Gui/ViewProviderMultiTransform.cpp b/src/Mod/PartDesign/Gui/ViewProviderMultiTransform.cpp index 2f9b6b3a11..f5aed61699 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderMultiTransform.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderMultiTransform.cpp @@ -21,7 +21,6 @@ ******************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderMultiTransform.h" #include "TaskMultiTransformParameters.h" diff --git a/src/Mod/PartDesign/Gui/ViewProviderPad.cpp b/src/Mod/PartDesign/Gui/ViewProviderPad.cpp index a3398d75a4..0c950a9ab8 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderPad.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderPad.cpp @@ -21,11 +21,9 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include "TaskPadParameters.h" #include "ViewProviderPad.h" diff --git a/src/Mod/PartDesign/Gui/ViewProviderPipe.cpp b/src/Mod/PartDesign/Gui/ViewProviderPipe.cpp index e2d7bbb1f4..3357d18da7 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderPipe.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderPipe.cpp @@ -21,11 +21,9 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderPocket.cpp b/src/Mod/PartDesign/Gui/ViewProviderPocket.cpp index fa949627f1..e683999559 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderPocket.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderPocket.cpp @@ -21,11 +21,9 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include "TaskPocketParameters.h" #include "ViewProviderPocket.h" diff --git a/src/Mod/PartDesign/Gui/ViewProviderPolarPattern.cpp b/src/Mod/PartDesign/Gui/ViewProviderPolarPattern.cpp index 53f33bffc6..25989e59bc 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderPolarPattern.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderPolarPattern.cpp @@ -20,7 +20,6 @@ * * ******************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderPolarPattern.h" #include "TaskPatternParameters.h" diff --git a/src/Mod/PartDesign/Gui/ViewProviderPrimitive.cpp b/src/Mod/PartDesign/Gui/ViewProviderPrimitive.cpp index e5d6a6fce0..3b3994d056 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderPrimitive.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderPrimitive.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderPyImp.cpp b/src/Mod/PartDesign/Gui/ViewProviderPyImp.cpp index 542fa72d0a..073a3980c2 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderPyImp.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderPyImp.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProvider.h" diff --git a/src/Mod/PartDesign/Gui/ViewProviderRevolution.cpp b/src/Mod/PartDesign/Gui/ViewProviderRevolution.cpp index acd3c371eb..a2f5df93bd 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderRevolution.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderRevolution.cpp @@ -21,11 +21,9 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include "TaskRevolutionParameters.h" #include "ViewProviderRevolution.h" diff --git a/src/Mod/PartDesign/Gui/ViewProviderScaled.cpp b/src/Mod/PartDesign/Gui/ViewProviderScaled.cpp index 548ab64c94..51528c55e9 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderScaled.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderScaled.cpp @@ -21,7 +21,6 @@ ******************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderScaled.h" #include "TaskScaledParameters.h" diff --git a/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp b/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp index f331a37283..48f9bec307 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp @@ -21,15 +21,13 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderSketchBased.cpp b/src/Mod/PartDesign/Gui/ViewProviderSketchBased.cpp index a8fc196426..11e3eabf86 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderSketchBased.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderSketchBased.cpp @@ -20,12 +20,7 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - -#ifndef _PreComp_ # include -#endif #include #include diff --git a/src/Mod/PartDesign/Gui/ViewProviderThickness.cpp b/src/Mod/PartDesign/Gui/ViewProviderThickness.cpp index e0f56e2e3a..92957156f5 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderThickness.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderThickness.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "TaskThicknessParameters.h" #include "ViewProviderThickness.h" diff --git a/src/Mod/PartDesign/Gui/ViewProviderTransformed.cpp b/src/Mod/PartDesign/Gui/ViewProviderTransformed.cpp index 861a35144c..6d9dbd7b53 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderTransformed.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderTransformed.cpp @@ -21,16 +21,14 @@ ******************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/PartDesign/Gui/Workbench.cpp b/src/Mod/PartDesign/Gui/Workbench.cpp index 89763f4240..e4187d3201 100644 --- a/src/Mod/PartDesign/Gui/Workbench.cpp +++ b/src/Mod/PartDesign/Gui/Workbench.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/PartDesign/Gui/WorkflowManager.cpp b/src/Mod/PartDesign/Gui/WorkflowManager.cpp index 443bb62a7b..dab60469f6 100644 --- a/src/Mod/PartDesign/Gui/WorkflowManager.cpp +++ b/src/Mod/PartDesign/Gui/WorkflowManager.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include From 015896f4e4b6d205a40bdfa3385fdf3d48b09b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sun, 21 Sep 2025 16:54:06 +0200 Subject: [PATCH 08/17] MeshPart: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- src/Mod/MeshPart/App/AppMeshPart.cpp | 1 - src/Mod/MeshPart/App/AppMeshPartPy.cpp | 4 +--- src/Mod/MeshPart/App/CMakeLists.txt | 7 +++--- src/Mod/MeshPart/App/CurveProjector.cpp | 6 ++--- src/Mod/MeshPart/App/MeshAlgos.cpp | 5 ++-- src/Mod/MeshPart/App/MeshFlattening.cpp | 3 --- .../MeshPart/App/MeshFlatteningLscmRelax.cpp | 4 +--- src/Mod/MeshPart/App/MeshFlatteningNurbs.cpp | 4 +--- src/Mod/MeshPart/App/MeshFlatteningPy.cpp | 3 --- src/Mod/MeshPart/App/Mesher.cpp | 3 --- src/Mod/MeshPart/App/PreCompiled.cpp | 23 ------------------- src/Mod/MeshPart/App/PreCompiled.h | 3 --- src/Mod/MeshPart/Gui/AppMeshPartGui.cpp | 1 - src/Mod/MeshPart/Gui/CMakeLists.txt | 10 ++++---- src/Mod/MeshPart/Gui/Command.cpp | 4 +--- src/Mod/MeshPart/Gui/CrossSections.cpp | 3 --- src/Mod/MeshPart/Gui/CurveOnMesh.cpp | 3 --- src/Mod/MeshPart/Gui/PreCompiled.cpp | 23 ------------------- src/Mod/MeshPart/Gui/PreCompiled.h | 4 ---- src/Mod/MeshPart/Gui/TaskCurveOnMesh.cpp | 1 - src/Mod/MeshPart/Gui/Tessellation.cpp | 4 +--- src/Mod/MeshPart/Gui/Workbench.cpp | 4 +--- 22 files changed, 19 insertions(+), 104 deletions(-) delete mode 100644 src/Mod/MeshPart/App/PreCompiled.cpp delete mode 100644 src/Mod/MeshPart/Gui/PreCompiled.cpp diff --git a/src/Mod/MeshPart/App/AppMeshPart.cpp b/src/Mod/MeshPart/App/AppMeshPart.cpp index 147d7d6257..3eed116924 100644 --- a/src/Mod/MeshPart/App/AppMeshPart.cpp +++ b/src/Mod/MeshPart/App/AppMeshPart.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/MeshPart/App/AppMeshPartPy.cpp b/src/Mod/MeshPart/App/AppMeshPartPy.cpp index 56a0bf897d..718df0ba13 100644 --- a/src/Mod/MeshPart/App/AppMeshPartPy.cpp +++ b/src/Mod/MeshPart/App/AppMeshPartPy.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/MeshPart/App/CMakeLists.txt b/src/Mod/MeshPart/App/CMakeLists.txt index 881c184f15..920424fc77 100644 --- a/src/Mod/MeshPart/App/CMakeLists.txt +++ b/src/Mod/MeshPart/App/CMakeLists.txt @@ -60,7 +60,6 @@ SET(MeshPart_SRCS MeshAlgos.h Mesher.cpp Mesher.h - PreCompiled.cpp PreCompiled.h ) @@ -69,9 +68,9 @@ set(MeshPart_Scripts ) if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${MeshPart_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(MeshPart PreCompiled.h PreCompiled.cpp PCH_SRCS) + target_precompile_headers(MeshPart PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) endif(FREECAD_USE_PCH) # Suppress -Wundefined-var-template diff --git a/src/Mod/MeshPart/App/CurveProjector.cpp b/src/Mod/MeshPart/App/CurveProjector.cpp index 62c6acae4c..4bb476690b 100644 --- a/src/Mod/MeshPart/App/CurveProjector.cpp +++ b/src/Mod/MeshPart/App/CurveProjector.cpp @@ -20,9 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include + +#include + #ifdef FC_OS_LINUX #include #endif @@ -43,7 +44,6 @@ #include #include #include -#endif #include #include diff --git a/src/Mod/MeshPart/App/MeshAlgos.cpp b/src/Mod/MeshPart/App/MeshAlgos.cpp index 573402bfb1..bb52be4a88 100644 --- a/src/Mod/MeshPart/App/MeshAlgos.cpp +++ b/src/Mod/MeshPart/App/MeshAlgos.cpp @@ -20,12 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + #ifdef FC_OS_LINUX #include #endif -#endif #include #include diff --git a/src/Mod/MeshPart/App/MeshFlattening.cpp b/src/Mod/MeshPart/App/MeshFlattening.cpp index 14f0888a01..d6d2bafe08 100644 --- a/src/Mod/MeshPart/App/MeshFlattening.cpp +++ b/src/Mod/MeshPart/App/MeshFlattening.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -33,7 +31,6 @@ #include #include #include -#endif #include "MeshFlattening.h" #include "MeshFlatteningLscmRelax.h" diff --git a/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.cpp b/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.cpp index 4c73f3f651..5ed70956e4 100644 --- a/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.cpp +++ b/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -29,7 +27,7 @@ #include #include #include -#endif + #include diff --git a/src/Mod/MeshPart/App/MeshFlatteningNurbs.cpp b/src/Mod/MeshPart/App/MeshFlatteningNurbs.cpp index da252cb943..588d9ebf9d 100644 --- a/src/Mod/MeshPart/App/MeshFlatteningNurbs.cpp +++ b/src/Mod/MeshPart/App/MeshFlatteningNurbs.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include "MeshFlatteningNurbs.h" diff --git a/src/Mod/MeshPart/App/MeshFlatteningPy.cpp b/src/Mod/MeshPart/App/MeshFlatteningPy.cpp index 700aba7f23..37d38a7144 100644 --- a/src/Mod/MeshPart/App/MeshFlatteningPy.cpp +++ b/src/Mod/MeshPart/App/MeshFlatteningPy.cpp @@ -25,15 +25,12 @@ # define strdup _strdup #endif -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include -#endif // necessary for the feature despite not all are necessary for compilation #include diff --git a/src/Mod/MeshPart/App/Mesher.cpp b/src/Mod/MeshPart/App/Mesher.cpp index eb1603a299..580d286257 100644 --- a/src/Mod/MeshPart/App/Mesher.cpp +++ b/src/Mod/MeshPart/App/Mesher.cpp @@ -20,15 +20,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include #include -#endif #include #include diff --git a/src/Mod/MeshPart/App/PreCompiled.cpp b/src/Mod/MeshPart/App/PreCompiled.cpp deleted file mode 100644 index cde4369c5b..0000000000 --- a/src/Mod/MeshPart/App/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2008 Jürgen Riegel * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/MeshPart/App/PreCompiled.h b/src/Mod/MeshPart/App/PreCompiled.h index 0905376a54..64dbeb96c4 100644 --- a/src/Mod/MeshPart/App/PreCompiled.h +++ b/src/Mod/MeshPart/App/PreCompiled.h @@ -25,8 +25,6 @@ #include -#ifdef _PreComp_ - // standard #include #include @@ -72,5 +70,4 @@ #include #include -#endif // _PreComp_ #endif diff --git a/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp b/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp index 6426a56e50..b7183ba179 100644 --- a/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp +++ b/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/MeshPart/Gui/CMakeLists.txt b/src/Mod/MeshPart/Gui/CMakeLists.txt index f4032a1b5b..ae66abdb1a 100644 --- a/src/Mod/MeshPart/Gui/CMakeLists.txt +++ b/src/Mod/MeshPart/Gui/CMakeLists.txt @@ -39,7 +39,6 @@ SET(MeshPartGui_SRCS CurveOnMesh.cpp CurveOnMesh.h Resources/MeshPart.qrc - PreCompiled.cpp PreCompiled.h TaskCurveOnMesh.ui TaskCurveOnMesh.cpp @@ -59,13 +58,14 @@ set(FLATMESH_PY_SRCS MeshFlatteningCommand.py ) +add_library(MeshPartGui SHARED ${MeshPartGui_SRCS} ${MeshPartGui_Scripts} ${FLATMESH_PY_SRCS}) + if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${MeshPartGui_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(MeshPartGui PreCompiled.h PreCompiled.cpp PCH_SRCS) + target_precompile_headers(MeshPartGui PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) endif(FREECAD_USE_PCH) -add_library(MeshPartGui SHARED ${MeshPartGui_SRCS} ${MeshPartGui_Scripts} ${FLATMESH_PY_SRCS}) target_include_directories( MeshPartGui PRIVATE diff --git a/src/Mod/MeshPart/Gui/Command.cpp b/src/Mod/MeshPart/Gui/Command.cpp index d8e298ee0d..d65ff92330 100644 --- a/src/Mod/MeshPart/Gui/Command.cpp +++ b/src/Mod/MeshPart/Gui/Command.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif + #include #include diff --git a/src/Mod/MeshPart/Gui/CrossSections.cpp b/src/Mod/MeshPart/Gui/CrossSections.cpp index 00df2c45a1..e2643fd457 100644 --- a/src/Mod/MeshPart/Gui/CrossSections.cpp +++ b/src/Mod/MeshPart/Gui/CrossSections.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include @@ -40,7 +38,6 @@ #include #include #include -#endif #include #include diff --git a/src/Mod/MeshPart/Gui/CurveOnMesh.cpp b/src/Mod/MeshPart/Gui/CurveOnMesh.cpp index 6e902d8fc5..c4f8a1a21d 100644 --- a/src/Mod/MeshPart/Gui/CurveOnMesh.cpp +++ b/src/Mod/MeshPart/Gui/CurveOnMesh.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -49,7 +47,6 @@ #include #include #include -#endif #include #include diff --git a/src/Mod/MeshPart/Gui/PreCompiled.cpp b/src/Mod/MeshPart/Gui/PreCompiled.cpp deleted file mode 100644 index cde4369c5b..0000000000 --- a/src/Mod/MeshPart/Gui/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2008 Jürgen Riegel * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/MeshPart/Gui/PreCompiled.h b/src/Mod/MeshPart/Gui/PreCompiled.h index 5a4b8be6cc..725de73281 100644 --- a/src/Mod/MeshPart/Gui/PreCompiled.h +++ b/src/Mod/MeshPart/Gui/PreCompiled.h @@ -25,8 +25,6 @@ #include -#ifdef _PreComp_ - // STL #include @@ -69,6 +67,4 @@ #include #include -#endif //_PreComp_ - #endif // __PRECOMPILED_GUI__ diff --git a/src/Mod/MeshPart/Gui/TaskCurveOnMesh.cpp b/src/Mod/MeshPart/Gui/TaskCurveOnMesh.cpp index 7f56c69428..f355d66aa0 100644 --- a/src/Mod/MeshPart/Gui/TaskCurveOnMesh.cpp +++ b/src/Mod/MeshPart/Gui/TaskCurveOnMesh.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/MeshPart/Gui/Tessellation.cpp b/src/Mod/MeshPart/Gui/Tessellation.cpp index 92b480351e..5e34210412 100644 --- a/src/Mod/MeshPart/Gui/Tessellation.cpp +++ b/src/Mod/MeshPart/Gui/Tessellation.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/MeshPart/Gui/Workbench.cpp b/src/Mod/MeshPart/Gui/Workbench.cpp index 837fe73416..0fbff9391a 100644 --- a/src/Mod/MeshPart/Gui/Workbench.cpp +++ b/src/Mod/MeshPart/Gui/Workbench.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include From 550786e6b0f3d7f006e1cf4287888cf9f27c87bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sun, 21 Sep 2025 17:17:29 +0200 Subject: [PATCH 09/17] Cloud: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- src/Mod/Cloud/App/AppCloud.cpp | 6 +- src/Mod/Cloud/App/AppCloud.h | 2 + src/Mod/Cloud/App/CMakeLists.txt | 7 +- src/Mod/Cloud/App/PreCompiled.h | 10 --- .../{App/PreCompiled.cpp => CloudGlobal.h} | 71 ++++++++++++------- src/Mod/Cloud/Gui/AppCloudGui.cpp | 1 - src/Mod/Cloud/Gui/CMakeLists.txt | 7 +- src/Mod/Cloud/Gui/Command.cpp | 1 - src/Mod/Cloud/Gui/PreCompiled.cpp | 24 ------- src/Mod/Cloud/Gui/PreCompiled.h | 13 ---- src/Mod/Cloud/Gui/Workbench.cpp | 1 - 11 files changed, 63 insertions(+), 80 deletions(-) rename src/Mod/Cloud/{App/PreCompiled.cpp => CloudGlobal.h} (75%) delete mode 100644 src/Mod/Cloud/Gui/PreCompiled.cpp diff --git a/src/Mod/Cloud/App/AppCloud.cpp b/src/Mod/Cloud/App/AppCloud.cpp index e2b7956b73..55ed2cdc7e 100644 --- a/src/Mod/Cloud/App/AppCloud.cpp +++ b/src/Mod/Cloud/App/AppCloud.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include + -#ifndef _PreComp_ #include -#endif - #if defined(FC_OS_WIN32) #include diff --git a/src/Mod/Cloud/App/AppCloud.h b/src/Mod/Cloud/App/AppCloud.h index e9cc8712ce..b8be72202a 100644 --- a/src/Mod/Cloud/App/AppCloud.h +++ b/src/Mod/Cloud/App/AppCloud.h @@ -27,6 +27,8 @@ #include #include +#include + #include #include #include diff --git a/src/Mod/Cloud/App/CMakeLists.txt b/src/Mod/Cloud/App/CMakeLists.txt index 88e1ee186c..6819da6891 100644 --- a/src/Mod/Cloud/App/CMakeLists.txt +++ b/src/Mod/Cloud/App/CMakeLists.txt @@ -19,13 +19,18 @@ set(Cloud_LIBS SET(Cloud_SRCS AppCloud.cpp - PreCompiled.cpp PreCompiled.h ) add_library(Cloud SHARED ${Cloud_SRCS}) target_link_libraries(Cloud ${Cloud_LIBS}) +if(FREECAD_USE_PCH) + target_precompile_headers(Cloud PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + SET_BIN_DIR(Cloud Cloud /Mod/Cloud) SET_PYTHON_PREFIX_SUFFIX(Cloud) diff --git a/src/Mod/Cloud/App/PreCompiled.h b/src/Mod/Cloud/App/PreCompiled.h index 2c093f3fc3..73a65a5d93 100644 --- a/src/Mod/Cloud/App/PreCompiled.h +++ b/src/Mod/Cloud/App/PreCompiled.h @@ -26,14 +26,6 @@ #include -// Exporting of App classes -#ifdef FC_OS_WIN32 -#define CloudAppExport __declspec(dllexport) -#else // for Linux -#define CloudAppExport -#endif - -#ifdef _PreComp_ // standard #include @@ -55,6 +47,4 @@ // Xerces #include -#endif //_PreComp_ - #endif diff --git a/src/Mod/Cloud/App/PreCompiled.cpp b/src/Mod/Cloud/CloudGlobal.h similarity index 75% rename from src/Mod/Cloud/App/PreCompiled.cpp rename to src/Mod/Cloud/CloudGlobal.h index d282e9a7d7..caaf18d77e 100644 --- a/src/Mod/Cloud/App/PreCompiled.cpp +++ b/src/Mod/Cloud/CloudGlobal.h @@ -1,24 +1,47 @@ -/*************************************************************************** - * Copyright (c) 2019 Jean-Marie Verdun jmverdun3@gmail.com * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" +/*************************************************************************** + * Copyright (c) 2021 Werner Mayer * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + +#ifndef CLOUD_GLOBAL_H +#define CLOUD_GLOBAL_H + +#include + +// Cloud +#ifndef CloudAppExport +#ifdef CloudApp_EXPORTS +#define CloudAppExport FREECAD_DECL_EXPORT +#else +#define CloudAppExport FREECAD_DECL_IMPORT +#endif +#endif + +// Cloud +#ifndef CloudGuiExport +#ifdef CloudGui_EXPORTS +#define CloudGuiExport FREECAD_DECL_EXPORT +#else +#define CloudGuiExport FREECAD_DECL_IMPORT +#endif +#endif + + +#endif // CLOUD_GLOBAL_H diff --git a/src/Mod/Cloud/Gui/AppCloudGui.cpp b/src/Mod/Cloud/Gui/AppCloudGui.cpp index f74d1a1a8d..10c14a59fd 100644 --- a/src/Mod/Cloud/Gui/AppCloudGui.cpp +++ b/src/Mod/Cloud/Gui/AppCloudGui.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Cloud/Gui/CMakeLists.txt b/src/Mod/Cloud/Gui/CMakeLists.txt index c773ea7df3..73907c8152 100644 --- a/src/Mod/Cloud/Gui/CMakeLists.txt +++ b/src/Mod/Cloud/Gui/CMakeLists.txt @@ -15,7 +15,6 @@ SET(CloudGui_SRCS ${Cloud_QRC_SRCS} AppCloudGui.cpp Command.cpp - PreCompiled.cpp PreCompiled.h Workbench.cpp Workbench.h @@ -28,6 +27,12 @@ SET(Cloud_SVG add_library(CloudGui SHARED ${CloudGui_SRCS} ${Cloud_SVG}) target_link_libraries(CloudGui ${CloudGui_LIBS}) +if(FREECAD_USE_PCH) + target_precompile_headers(CloudGui PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + fc_copy_sources(CloudGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Cloud" ${Cloud_SVG}) SET_BIN_DIR(CloudGui CloudGui /Mod/Cloud) diff --git a/src/Mod/Cloud/Gui/Command.cpp b/src/Mod/Cloud/Gui/Command.cpp index ae8f107ed5..787e2927ed 100644 --- a/src/Mod/Cloud/Gui/Command.cpp +++ b/src/Mod/Cloud/Gui/Command.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Cloud/Gui/PreCompiled.cpp b/src/Mod/Cloud/Gui/PreCompiled.cpp deleted file mode 100644 index 3e276ae6b8..0000000000 --- a/src/Mod/Cloud/Gui/PreCompiled.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2019 Jean-Marie Verdun jmverdun3@gmail.com * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" diff --git a/src/Mod/Cloud/Gui/PreCompiled.h b/src/Mod/Cloud/Gui/PreCompiled.h index b531f3bdb1..eccac6c52a 100644 --- a/src/Mod/Cloud/Gui/PreCompiled.h +++ b/src/Mod/Cloud/Gui/PreCompiled.h @@ -26,17 +26,6 @@ #include -// Importing of App classes -#ifdef FC_OS_WIN32 -#define CloudAppExport __declspec(dllimport) -#define CloudGuiExport __declspec(dllexport) -#else // for Linux -#define CloudAppExport -#define CloudGuiExport -#endif - -#ifdef _PreComp_ - // standard #include #include @@ -60,6 +49,4 @@ // Qt Toolkit #include -#endif //_PreComp_ - #endif // GUI_PRECOMPILED_H diff --git a/src/Mod/Cloud/Gui/Workbench.cpp b/src/Mod/Cloud/Gui/Workbench.cpp index eb864c57fd..073d8f417a 100644 --- a/src/Mod/Cloud/Gui/Workbench.cpp +++ b/src/Mod/Cloud/Gui/Workbench.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "Workbench.h" #include From 499742eea23c65f54aa4c1a9e4a9317bcdc2a837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sun, 21 Sep 2025 17:19:17 +0200 Subject: [PATCH 10/17] Draft: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- src/Mod/Draft/App/AppDraftUtils.cpp | 1 - src/Mod/Draft/App/AppDraftUtilsPy.cpp | 1 - src/Mod/Draft/App/CMakeLists.txt | 8 +++++++- src/Mod/Draft/App/PreCompiled.cpp | 23 ----------------------- 4 files changed, 7 insertions(+), 26 deletions(-) delete mode 100644 src/Mod/Draft/App/PreCompiled.cpp diff --git a/src/Mod/Draft/App/AppDraftUtils.cpp b/src/Mod/Draft/App/AppDraftUtils.cpp index 3bfddd9884..a6742cd5fd 100644 --- a/src/Mod/Draft/App/AppDraftUtils.cpp +++ b/src/Mod/Draft/App/AppDraftUtils.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Draft/App/AppDraftUtilsPy.cpp b/src/Mod/Draft/App/AppDraftUtilsPy.cpp index a0b831c097..a0ab38b580 100644 --- a/src/Mod/Draft/App/AppDraftUtilsPy.cpp +++ b/src/Mod/Draft/App/AppDraftUtilsPy.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Draft/App/CMakeLists.txt b/src/Mod/Draft/App/CMakeLists.txt index 993cabed86..da38dcbce3 100644 --- a/src/Mod/Draft/App/CMakeLists.txt +++ b/src/Mod/Draft/App/CMakeLists.txt @@ -11,11 +11,17 @@ set(DraftUtils_LIBS SET(DraftUtils_SRCS AppDraftUtils.cpp AppDraftUtilsPy.cpp - PreCompiled.cpp PreCompiled.h ) add_library(DraftUtils SHARED ${DraftUtils_SRCS}) + +if(FREECAD_USE_PCH) + target_precompile_headers(DraftUtils PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_include_directories( DraftUtils PRIVATE diff --git a/src/Mod/Draft/App/PreCompiled.cpp b/src/Mod/Draft/App/PreCompiled.cpp deleted file mode 100644 index 2432ed0264..0000000000 --- a/src/Mod/Draft/App/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2015 Yorik van Havre * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" From ba03cf1ed6332cd9c67ce1ef7ae88a9277761118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sun, 21 Sep 2025 17:27:32 +0200 Subject: [PATCH 11/17] JtReader: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- src/Mod/JtReader/App/AppJtReader.cpp | 1 - src/Mod/JtReader/App/AppJtReaderPy.cpp | 1 - src/Mod/JtReader/App/CMakeLists.txt | 8 +++++++- src/Mod/JtReader/App/FcLodHandler.cpp | 1 - src/Mod/JtReader/App/JtReader.cpp | 4 +--- src/Mod/JtReader/App/PreCompiled.cpp | 7 ------- src/Mod/JtReader/App/PreCompiled.h | 14 -------------- src/Mod/JtReader/App/TKJtReader.cpp | 1 - src/Mod/JtReader/App/TestJtReader.cpp | 4 +--- 9 files changed, 9 insertions(+), 32 deletions(-) delete mode 100644 src/Mod/JtReader/App/PreCompiled.cpp diff --git a/src/Mod/JtReader/App/AppJtReader.cpp b/src/Mod/JtReader/App/AppJtReader.cpp index 3684bec02c..1f4ec3cfdc 100644 --- a/src/Mod/JtReader/App/AppJtReader.cpp +++ b/src/Mod/JtReader/App/AppJtReader.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/JtReader/App/AppJtReaderPy.cpp b/src/Mod/JtReader/App/AppJtReaderPy.cpp index a2c020bdae..2cbc18a5c0 100644 --- a/src/Mod/JtReader/App/AppJtReaderPy.cpp +++ b/src/Mod/JtReader/App/AppJtReaderPy.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/JtReader/App/CMakeLists.txt b/src/Mod/JtReader/App/CMakeLists.txt index d0407039da..8c3b15e04e 100644 --- a/src/Mod/JtReader/App/CMakeLists.txt +++ b/src/Mod/JtReader/App/CMakeLists.txt @@ -16,7 +16,6 @@ set(JtReader_LIBS SET(JtReader_SRCS AppJtReader.cpp AppJtReaderPy.cpp - PreCompiled.cpp PreCompiled.h TestJtReader.cpp TestJtReader.h @@ -48,6 +47,13 @@ SOURCE_GROUP("JrJt" FILES ${JRJT_SRCS} ) SOURCE_GROUP("Module" FILES ${JtReader_SRCS}) add_library(JtReader SHARED ${JtReader_SRCS} ${JRJT_SRCS} ${JtReader_Scripts}) + +if(FREECAD_USE_PCH) + target_precompile_headers(JtReader PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_link_libraries(JtReader ${JtReader_LIBS}) if (MSVC) diff --git a/src/Mod/JtReader/App/FcLodHandler.cpp b/src/Mod/JtReader/App/FcLodHandler.cpp index cd3f997836..342b258ce3 100644 --- a/src/Mod/JtReader/App/FcLodHandler.cpp +++ b/src/Mod/JtReader/App/FcLodHandler.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/JtReader/App/JtReader.cpp b/src/Mod/JtReader/App/JtReader.cpp index 89575e7539..0d7dd69f3d 100644 --- a/src/Mod/JtReader/App/JtReader.cpp +++ b/src/Mod/JtReader/App/JtReader.cpp @@ -3,13 +3,11 @@ * LGPL * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include -#endif + #include #include diff --git a/src/Mod/JtReader/App/PreCompiled.cpp b/src/Mod/JtReader/App/PreCompiled.cpp deleted file mode 100644 index af15487840..0000000000 --- a/src/Mod/JtReader/App/PreCompiled.cpp +++ /dev/null @@ -1,7 +0,0 @@ -/*************************************************************************** - * Copyright (c) Juergen Riegel 2007 * - * LGPL * - ***************************************************************************/ - - -#include "PreCompiled.h" diff --git a/src/Mod/JtReader/App/PreCompiled.h b/src/Mod/JtReader/App/PreCompiled.h index ccfecec3af..280cd59a48 100644 --- a/src/Mod/JtReader/App/PreCompiled.h +++ b/src/Mod/JtReader/App/PreCompiled.h @@ -8,19 +8,7 @@ #include -// Importing of App classes -#ifdef FC_OS_WIN32 -#define MeshExport __declspec(dllimport) -#define AppJtReaderExport __declspec(dllexport) -#else // for Linux -#define MeshExport -#define AppJtReaderExport -#endif - -#ifdef _PreComp_ - // standard - #include #include @@ -41,6 +29,4 @@ // sys #include -#endif //_PreComp_ - #endif diff --git a/src/Mod/JtReader/App/TKJtReader.cpp b/src/Mod/JtReader/App/TKJtReader.cpp index 66b5d696fc..e8251baa74 100644 --- a/src/Mod/JtReader/App/TKJtReader.cpp +++ b/src/Mod/JtReader/App/TKJtReader.cpp @@ -21,7 +21,6 @@ * * **************************************************************************/ -#include "PreCompiled.h" #include #include "TKJtReader.h" diff --git a/src/Mod/JtReader/App/TestJtReader.cpp b/src/Mod/JtReader/App/TestJtReader.cpp index 47839de734..2265aa16a5 100644 --- a/src/Mod/JtReader/App/TestJtReader.cpp +++ b/src/Mod/JtReader/App/TestJtReader.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include From 8fa48b25b496da3792a7c14465e0ae6fc6312aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sun, 21 Sep 2025 22:53:51 +0200 Subject: [PATCH 12/17] Part: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- src/Mod/Part/App/AppPart.cpp | 5 ++-- src/Mod/Part/App/AppPartPy.cpp | 4 +--- src/Mod/Part/App/ArcOfCirclePyImp.cpp | 4 +--- src/Mod/Part/App/ArcOfConicPyImp.cpp | 4 +--- src/Mod/Part/App/ArcOfEllipsePyImp.cpp | 4 +--- src/Mod/Part/App/ArcOfHyperbolaPyImp.cpp | 4 +--- src/Mod/Part/App/ArcOfParabolaPyImp.cpp | 4 +--- src/Mod/Part/App/ArcPyImp.cpp | 4 +--- src/Mod/Part/App/AttachEnginePyImp.cpp | 4 +--- src/Mod/Part/App/AttachExtension.cpp | 1 - src/Mod/Part/App/AttachExtension.h | 2 ++ src/Mod/Part/App/AttachExtensionPyImp.cpp | 1 - src/Mod/Part/App/Attacher.cpp | 3 --- src/Mod/Part/App/Attacher.h | 2 ++ src/Mod/Part/App/BRepFeat/MakePrismPyImp.cpp | 6 ++--- src/Mod/Part/App/BRepMesh.cpp | 4 +--- .../App/BRepOffsetAPI_MakeFillingPyImp.cpp | 6 ++--- .../Part/App/BRepOffsetAPI_MakeOffsetFix.cpp | 4 +--- .../App/BRepOffsetAPI_MakePipeShellPyImp.cpp | 6 ++--- src/Mod/Part/App/BSplineCurveBiArcs.cpp | 4 +--- src/Mod/Part/App/BSplineCurvePyImp.cpp | 4 +--- src/Mod/Part/App/BSplineSurfacePyImp.cpp | 4 +--- src/Mod/Part/App/BezierCurvePyImp.cpp | 4 +--- src/Mod/Part/App/BezierSurfacePyImp.cpp | 4 +--- src/Mod/Part/App/BodyBase.cpp | 1 - src/Mod/Part/App/BodyBase.h | 2 ++ src/Mod/Part/App/BodyBasePyImp.cpp | 1 - src/Mod/Part/App/BoundedCurvePyImp.cpp | 4 +--- src/Mod/Part/App/CMakeLists.txt | 7 +++--- .../App/ChFi2d/ChFi2d_AnaFilletAlgoPyImp.cpp | 6 ++--- .../App/ChFi2d/ChFi2d_ChamferAPIPyImp.cpp | 6 ++--- .../Part/App/ChFi2d/ChFi2d_FilletAPIPyImp.cpp | 6 ++--- .../App/ChFi2d/ChFi2d_FilletAlgoPyImp.cpp | 6 ++--- src/Mod/Part/App/CirclePyImp.cpp | 4 +--- src/Mod/Part/App/ConePyImp.cpp | 4 +--- src/Mod/Part/App/ConicPyImp.cpp | 4 +--- src/Mod/Part/App/CrossSection.cpp | 4 +--- src/Mod/Part/App/CustomFeature.cpp | 1 - src/Mod/Part/App/CustomFeature.h | 2 ++ src/Mod/Part/App/CylinderPyImp.cpp | 4 +--- src/Mod/Part/App/DatumFeature.cpp | 1 - src/Mod/Part/App/DatumFeature.h | 2 ++ src/Mod/Part/App/Datums.cpp | 1 - src/Mod/Part/App/Datums.h | 2 ++ src/Mod/Part/App/EllipsePyImp.cpp | 4 +--- src/Mod/Part/App/ExtrusionHelper.cpp | 6 ++--- src/Mod/Part/App/FT2FC.cpp | 4 +--- src/Mod/Part/App/FaceMaker.cpp | 4 +--- src/Mod/Part/App/FaceMakerBullseye.cpp | 3 --- src/Mod/Part/App/FaceMakerBullseye.h | 1 + src/Mod/Part/App/FaceMakerCheese.cpp | 4 +--- src/Mod/Part/App/FaceMakerCheese.h | 2 ++ src/Mod/Part/App/FeatureChamfer.cpp | 4 +--- src/Mod/Part/App/FeatureChamfer.h | 1 + src/Mod/Part/App/FeatureCompound.cpp | 4 +--- src/Mod/Part/App/FeatureCompound.h | 3 +++ src/Mod/Part/App/FeatureExtrusion.cpp | 6 ++--- src/Mod/Part/App/FeatureExtrusion.h | 4 +++- src/Mod/Part/App/FeatureFace.cpp | 4 +--- src/Mod/Part/App/FeatureFace.h | 2 ++ src/Mod/Part/App/FeatureFillet.cpp | 6 ++--- src/Mod/Part/App/FeatureFillet.h | 2 ++ src/Mod/Part/App/FeatureGeometrySet.cpp | 1 - src/Mod/Part/App/FeatureGeometrySet.h | 2 ++ src/Mod/Part/App/FeatureMirroring.cpp | 4 +--- src/Mod/Part/App/FeatureMirroring.h | 2 ++ src/Mod/Part/App/FeatureOffset.cpp | 4 +--- src/Mod/Part/App/FeatureOffset.h | 2 ++ src/Mod/Part/App/FeaturePartBoolean.cpp | 5 ++-- src/Mod/Part/App/FeaturePartBoolean.h | 3 +++ src/Mod/Part/App/FeaturePartBox.cpp | 4 +--- src/Mod/Part/App/FeaturePartBox.h | 2 ++ src/Mod/Part/App/FeaturePartCircle.cpp | 4 +--- src/Mod/Part/App/FeaturePartCircle.h | 3 ++- src/Mod/Part/App/FeaturePartCommon.cpp | 4 +--- src/Mod/Part/App/FeaturePartCommon.h | 2 ++ src/Mod/Part/App/FeaturePartCurveNet.cpp | 1 - src/Mod/Part/App/FeaturePartCut.cpp | 4 +--- src/Mod/Part/App/FeaturePartFuse.cpp | 4 +--- src/Mod/Part/App/FeaturePartFuse.h | 2 ++ src/Mod/Part/App/FeaturePartImportBrep.cpp | 4 +--- src/Mod/Part/App/FeaturePartImportIges.cpp | 4 +--- src/Mod/Part/App/FeaturePartImportStep.cpp | 4 +--- src/Mod/Part/App/FeaturePartPolygon.cpp | 4 +--- src/Mod/Part/App/FeaturePartSection.cpp | 4 +--- src/Mod/Part/App/FeaturePartSpline.cpp | 1 - src/Mod/Part/App/FeaturePartSpline.h | 2 ++ src/Mod/Part/App/FeatureProjectOnSurface.cpp | 4 +--- src/Mod/Part/App/FeatureProjectOnSurface.h | 1 + src/Mod/Part/App/FeatureRevolution.cpp | 4 +--- src/Mod/Part/App/FeatureRevolution.h | 2 ++ src/Mod/Part/App/FeatureScale.cpp | 4 +--- src/Mod/Part/App/FeatureScale.h | 2 ++ src/Mod/Part/App/FuzzyHelper.cpp | 1 - .../Part/App/Geom2d/ArcOfCircle2dPyImp.cpp | 4 +--- src/Mod/Part/App/Geom2d/ArcOfConic2dPyImp.cpp | 4 +--- .../Part/App/Geom2d/ArcOfEllipse2dPyImp.cpp | 4 +--- .../Part/App/Geom2d/ArcOfHyperbola2dPyImp.cpp | 4 +--- .../Part/App/Geom2d/ArcOfParabola2dPyImp.cpp | 4 +--- .../Part/App/Geom2d/BSplineCurve2dPyImp.cpp | 4 +--- .../Part/App/Geom2d/BezierCurve2dPyImp.cpp | 4 +--- src/Mod/Part/App/Geom2d/Circle2dPyImp.cpp | 4 +--- src/Mod/Part/App/Geom2d/Conic2dPyImp.cpp | 4 +--- src/Mod/Part/App/Geom2d/Curve2dPyImp.cpp | 3 --- src/Mod/Part/App/Geom2d/Ellipse2dPyImp.cpp | 4 +--- src/Mod/Part/App/Geom2d/Geometry2dPyImp.cpp | 4 +--- src/Mod/Part/App/Geom2d/Hyperbola2dPyImp.cpp | 4 +--- src/Mod/Part/App/Geom2d/Line2dPyImp.cpp | 4 +--- .../Part/App/Geom2d/Line2dSegmentPyImp.cpp | 4 +--- .../Part/App/Geom2d/OffsetCurve2dPyImp.cpp | 4 +--- src/Mod/Part/App/Geom2d/Parabola2dPyImp.cpp | 4 +--- .../App/GeomPlate/BuildPlateSurfacePyImp.cpp | 6 ++--- .../App/GeomPlate/CurveConstraintPyImp.cpp | 5 ++-- .../App/GeomPlate/PointConstraintPyImp.cpp | 6 ++--- src/Mod/Part/App/Geometry.cpp | 11 ++++----- src/Mod/Part/App/Geometry2d.cpp | 4 +--- .../Part/App/GeometryBoolExtensionPyImp.cpp | 1 - src/Mod/Part/App/GeometryCurvePyImp.cpp | 5 ---- src/Mod/Part/App/GeometryDefaultExtension.cpp | 1 - src/Mod/Part/App/GeometryDefaultExtension.h | 2 ++ .../Part/App/GeometryDoubleExtensionPyImp.cpp | 1 - src/Mod/Part/App/GeometryExtension.cpp | 1 - src/Mod/Part/App/GeometryExtensionPyImp.cpp | 1 - .../Part/App/GeometryIntExtensionPyImp.cpp | 1 - .../Part/App/GeometryMigrationExtension.cpp | 1 - src/Mod/Part/App/GeometryMigrationExtension.h | 1 + src/Mod/Part/App/GeometryPyImp.cpp | 4 +--- .../Part/App/GeometryStringExtensionPyImp.cpp | 4 +--- src/Mod/Part/App/GeometrySurfacePyImp.cpp | 4 +--- .../Part/App/HLRBRep/HLRBRep_AlgoPyImp.cpp | 5 ++-- .../App/HLRBRep/HLRBRep_PolyAlgoPyImp.cpp | 5 ++-- src/Mod/Part/App/HLRBRep/HLRToShapePyImp.cpp | 2 +- .../Part/App/HLRBRep/PolyHLRToShapePyImp.cpp | 2 +- src/Mod/Part/App/HyperbolaPyImp.cpp | 4 +--- .../Part/App/IGES/ImportExportSettings.cpp | 4 +--- src/Mod/Part/App/IGES/ImportExportSettings.h | 1 + src/Mod/Part/App/ImportIges.cpp | 4 +--- src/Mod/Part/App/ImportStep.cpp | 4 +--- src/Mod/Part/App/Interface.cpp | 4 +--- src/Mod/Part/App/LinePyImp.cpp | 4 +--- src/Mod/Part/App/LineSegmentPyImp.cpp | 4 +--- src/Mod/Part/App/MeasureClient.cpp | 1 - .../Part/App/OCAF/ImportExportSettings.cpp | 4 +--- src/Mod/Part/App/OCAF/ImportExportSettings.h | 2 ++ src/Mod/Part/App/OffsetCurvePyImp.cpp | 4 +--- src/Mod/Part/App/OffsetSurfacePyImp.cpp | 4 +--- src/Mod/Part/App/ParabolaPyImp.cpp | 4 +--- src/Mod/Part/App/Part2DObject.cpp | 4 +--- src/Mod/Part/App/Part2DObject.h | 2 ++ src/Mod/Part/App/Part2DObjectPyImp.cpp | 1 - src/Mod/Part/App/PartFeature.cpp | 4 +--- src/Mod/Part/App/PartFeature.h | 2 ++ src/Mod/Part/App/PartFeaturePyImp.cpp | 1 - src/Mod/Part/App/PartFeatureReference.cpp | 4 +--- src/Mod/Part/App/PartFeatureReference.h | 2 ++ src/Mod/Part/App/PartFeatures.cpp | 4 +--- src/Mod/Part/App/PartFeatures.h | 2 ++ src/Mod/Part/App/PartPyCXX.cpp | 1 - src/Mod/Part/App/PartPyCXX.h | 1 + src/Mod/Part/App/PlanePyImp.cpp | 4 +--- src/Mod/Part/App/PlateSurfacePyImp.cpp | 4 +--- src/Mod/Part/App/PointPyImp.cpp | 4 +--- src/Mod/Part/App/PreCompiled.cpp | 24 ------------------- src/Mod/Part/App/PreCompiled.h | 5 +--- src/Mod/Part/App/PreviewExtension.cpp | 2 -- src/Mod/Part/App/PreviewExtension.h | 2 ++ src/Mod/Part/App/PrimitiveFeature.cpp | 4 +--- src/Mod/Part/App/PrimitiveFeature.h | 2 ++ src/Mod/Part/App/PrismExtension.cpp | 4 +--- src/Mod/Part/App/PropertyGeometryList.cpp | 1 - src/Mod/Part/App/PropertyGeometryList.h | 2 ++ src/Mod/Part/App/PropertyTopoShape.cpp | 3 --- src/Mod/Part/App/PropertyTopoShape.h | 2 ++ src/Mod/Part/App/PropertyTopoShapeList.cpp | 1 - .../App/RectangularTrimmedSurfacePyImp.cpp | 4 +--- .../Part/App/STEP/ImportExportSettings.cpp | 4 +--- src/Mod/Part/App/STEP/ImportExportSettings.h | 1 + src/Mod/Part/App/Services.cpp | 2 -- .../ShapeFix/ShapeFix_EdgeConnectPyImp.cpp | 6 ++--- .../Part/App/ShapeFix/ShapeFix_EdgePyImp.cpp | 6 ++--- .../ShapeFix/ShapeFix_FaceConnectPyImp.cpp | 6 ++--- .../Part/App/ShapeFix/ShapeFix_FacePyImp.cpp | 6 ++--- .../ShapeFix/ShapeFix_FixSmallFacePyImp.cpp | 6 ++--- .../ShapeFix/ShapeFix_FixSmallSolidPyImp.cpp | 6 ++--- .../App/ShapeFix/ShapeFix_FreeBoundsPyImp.cpp | 6 ++--- .../Part/App/ShapeFix/ShapeFix_RootPyImp.cpp | 6 ++--- .../Part/App/ShapeFix/ShapeFix_ShapePyImp.cpp | 2 +- .../ShapeFix/ShapeFix_ShapeTolerancePyImp.cpp | 6 ++--- .../Part/App/ShapeFix/ShapeFix_ShellPyImp.cpp | 6 ++--- .../Part/App/ShapeFix/ShapeFix_SolidPyImp.cpp | 5 ++-- .../ShapeFix_SplitCommonVertexPyImp.cpp | 4 ++-- .../App/ShapeFix/ShapeFix_SplitToolPyImp.cpp | 6 ++--- .../Part/App/ShapeFix/ShapeFix_WirePyImp.cpp | 6 ++--- .../App/ShapeFix/ShapeFix_WireVertexPyImp.cpp | 6 ++--- .../App/ShapeFix/ShapeFix_WireframePyImp.cpp | 2 +- .../App/ShapeUpgrade/UnifySameDomainPyImp.cpp | 5 ++-- src/Mod/Part/App/SpherePyImp.cpp | 4 +--- src/Mod/Part/App/SurfaceOfExtrusionPyImp.cpp | 4 +--- src/Mod/Part/App/SurfaceOfRevolutionPyImp.cpp | 4 +--- src/Mod/Part/App/Tools.cpp | 3 --- src/Mod/Part/App/TopoShape.cpp | 4 +--- src/Mod/Part/App/TopoShapeCache.cpp | 1 - src/Mod/Part/App/TopoShapeCache.h | 7 ++---- src/Mod/Part/App/TopoShapeCompSolidPyImp.cpp | 4 +--- src/Mod/Part/App/TopoShapeCompoundPyImp.cpp | 4 +--- src/Mod/Part/App/TopoShapeEdgePyImp.cpp | 4 +--- src/Mod/Part/App/TopoShapeExpansion.cpp | 11 +++++---- src/Mod/Part/App/TopoShapeFacePyImp.cpp | 4 +--- src/Mod/Part/App/TopoShapeMapper.cpp | 4 +--- src/Mod/Part/App/TopoShapeMapper.h | 2 ++ src/Mod/Part/App/TopoShapeOpCode.h | 2 ++ src/Mod/Part/App/TopoShapePyImp.cpp | 3 --- src/Mod/Part/App/TopoShapeShellPyImp.cpp | 4 +--- src/Mod/Part/App/TopoShapeSolidPyImp.cpp | 4 +--- src/Mod/Part/App/TopoShapeVertexPyImp.cpp | 4 +--- src/Mod/Part/App/TopoShapeWirePyImp.cpp | 4 +--- src/Mod/Part/App/ToroidPyImp.cpp | 4 +--- src/Mod/Part/App/TrimmedCurvePyImp.cpp | 4 +--- src/Mod/Part/App/VectorAdapter.cpp | 1 - src/Mod/Part/App/WireJoiner.cpp | 6 ++--- src/Mod/Part/App/WireJoiner.h | 2 ++ src/Mod/Part/App/edgecluster.cpp | 4 +--- src/Mod/Part/App/modelRefine.cpp | 3 --- src/Mod/Part/Gui/AppPartGui.cpp | 5 ---- src/Mod/Part/Gui/AttacherTexts.cpp | 4 +--- src/Mod/Part/Gui/AttacherTexts.h | 1 + src/Mod/Part/Gui/BoxSelection.cpp | 4 +--- src/Mod/Part/Gui/CMakeLists.txt | 13 +++++----- src/Mod/Part/Gui/Command.cpp | 4 +--- src/Mod/Part/Gui/CommandFilter.cpp | 4 +--- src/Mod/Part/Gui/CommandParametric.cpp | 4 +--- src/Mod/Part/Gui/CommandSimple.cpp | 4 +--- src/Mod/Part/Gui/CrossSections.cpp | 5 +--- src/Mod/Part/Gui/DlgBooleanOperation.cpp | 4 +--- src/Mod/Part/Gui/DlgExportStep.cpp | 4 +--- src/Mod/Part/Gui/DlgExtrusion.cpp | 4 +--- src/Mod/Part/Gui/DlgFilletEdges.cpp | 3 --- src/Mod/Part/Gui/DlgImportStep.cpp | 4 +--- src/Mod/Part/Gui/DlgPartBoxImp.cpp | 1 - src/Mod/Part/Gui/DlgPartCylinderImp.cpp | 1 - src/Mod/Part/Gui/DlgPartImportIgesImp.cpp | 1 - src/Mod/Part/Gui/DlgPartImportStepImp.cpp | 1 - src/Mod/Part/Gui/DlgPrimitives.cpp | 5 ++-- src/Mod/Part/Gui/DlgProjectionOnSurface.cpp | 5 ++-- src/Mod/Part/Gui/DlgRevolution.cpp | 24 +++++++++---------- src/Mod/Part/Gui/DlgScale.cpp | 4 +--- src/Mod/Part/Gui/DlgSettings3DViewPartImp.cpp | 4 +--- src/Mod/Part/Gui/DlgSettingsGeneral.cpp | 4 +--- src/Mod/Part/Gui/DlgSettingsObjectColor.cpp | 1 - src/Mod/Part/Gui/Mirroring.cpp | 4 ---- src/Mod/Part/Gui/PatternParametersWidget.cpp | 4 ---- src/Mod/Part/Gui/PreCompiled.cpp | 24 ------------------- src/Mod/Part/Gui/PreCompiled.h | 2 -- src/Mod/Part/Gui/PropertyEnumAttacherItem.cpp | 5 ---- src/Mod/Part/Gui/PropertyEnumAttacherItem.h | 3 +++ src/Mod/Part/Gui/ReferenceHighlighter.cpp | 3 --- src/Mod/Part/Gui/SectionCutting.cpp | 24 ++++++++----------- src/Mod/Part/Gui/ShapeFromMesh.cpp | 4 +--- src/Mod/Part/Gui/SoBrepEdgeSet.cpp | 8 +++---- src/Mod/Part/Gui/SoBrepFaceSet.cpp | 4 +--- src/Mod/Part/Gui/SoBrepPointSet.cpp | 4 +--- src/Mod/Part/Gui/SoFCShapeObject.cpp | 4 +--- src/Mod/Part/Gui/SoFCShapeObject.h | 2 ++ src/Mod/Part/Gui/TaskAttacher.cpp | 4 +--- src/Mod/Part/Gui/TaskAttacher.h | 2 ++ src/Mod/Part/Gui/TaskCheckGeometry.cpp | 3 --- src/Mod/Part/Gui/TaskFaceAppearances.cpp | 4 +--- src/Mod/Part/Gui/TaskLoft.cpp | 4 +--- src/Mod/Part/Gui/TaskOffset.cpp | 7 ++---- src/Mod/Part/Gui/TaskShapeBuilder.cpp | 4 +--- src/Mod/Part/Gui/TaskSweep.cpp | 4 +--- src/Mod/Part/Gui/TaskThickness.cpp | 3 --- src/Mod/Part/Gui/ViewProvider.cpp | 4 +--- src/Mod/Part/Gui/ViewProvider.h | 1 + src/Mod/Part/Gui/ViewProvider2DObject.cpp | 5 ---- src/Mod/Part/Gui/ViewProvider2DObject.h | 2 ++ .../Part/Gui/ViewProviderAttachExtension.cpp | 4 ---- src/Mod/Part/Gui/ViewProviderBoolean.cpp | 4 +--- src/Mod/Part/Gui/ViewProviderBoolean.h | 2 ++ src/Mod/Part/Gui/ViewProviderBox.cpp | 1 - src/Mod/Part/Gui/ViewProviderBox.h | 2 ++ .../Part/Gui/ViewProviderCircleParametric.cpp | 1 - .../Part/Gui/ViewProviderCircleParametric.h | 2 ++ src/Mod/Part/Gui/ViewProviderCompound.cpp | 4 +--- src/Mod/Part/Gui/ViewProviderCompound.h | 2 ++ .../Part/Gui/ViewProviderConeParametric.cpp | 1 - src/Mod/Part/Gui/ViewProviderConeParametric.h | 2 ++ src/Mod/Part/Gui/ViewProviderCurveNet.cpp | 4 +--- src/Mod/Part/Gui/ViewProviderCurveNet.h | 2 ++ .../Gui/ViewProviderCylinderParametric.cpp | 1 - .../Part/Gui/ViewProviderCylinderParametric.h | 2 ++ src/Mod/Part/Gui/ViewProviderDatum.cpp | 6 ----- src/Mod/Part/Gui/ViewProviderDatum.h | 2 ++ .../Gui/ViewProviderEllipseParametric.cpp | 1 - .../Part/Gui/ViewProviderEllipseParametric.h | 2 ++ src/Mod/Part/Gui/ViewProviderExt.cpp | 4 ---- src/Mod/Part/Gui/ViewProviderExtrusion.cpp | 1 - src/Mod/Part/Gui/ViewProviderExtrusion.h | 2 ++ .../Part/Gui/ViewProviderGridExtension.cpp | 5 ---- .../Part/Gui/ViewProviderHelixParametric.cpp | 4 +--- .../Part/Gui/ViewProviderHelixParametric.h | 2 ++ src/Mod/Part/Gui/ViewProviderImport.cpp | 1 - src/Mod/Part/Gui/ViewProviderImport.h | 2 ++ .../Part/Gui/ViewProviderLineParametric.cpp | 1 - src/Mod/Part/Gui/ViewProviderLineParametric.h | 2 ++ src/Mod/Part/Gui/ViewProviderMirror.cpp | 4 ---- src/Mod/Part/Gui/ViewProviderMirror.h | 2 ++ src/Mod/Part/Gui/ViewProviderPartExtPyImp.cpp | 4 +--- .../Part/Gui/ViewProviderPlaneParametric.cpp | 1 - .../Part/Gui/ViewProviderPlaneParametric.h | 2 ++ .../Part/Gui/ViewProviderPointParametric.cpp | 1 - .../Part/Gui/ViewProviderPointParametric.h | 2 ++ .../Part/Gui/ViewProviderPreviewExtension.cpp | 4 ---- .../Part/Gui/ViewProviderPreviewExtension.h | 1 + src/Mod/Part/Gui/ViewProviderPrimitive.cpp | 4 +--- src/Mod/Part/Gui/ViewProviderPrimitive.h | 1 + src/Mod/Part/Gui/ViewProviderPrism.cpp | 1 - src/Mod/Part/Gui/ViewProviderPrism.h | 2 ++ .../Part/Gui/ViewProviderProjectOnSurface.cpp | 4 +--- .../Part/Gui/ViewProviderProjectOnSurface.h | 2 ++ src/Mod/Part/Gui/ViewProviderPython.cpp | 4 +--- src/Mod/Part/Gui/ViewProviderPython.h | 2 ++ src/Mod/Part/Gui/ViewProviderReference.cpp | 4 ---- .../Part/Gui/ViewProviderRegularPolygon.cpp | 1 - src/Mod/Part/Gui/ViewProviderRegularPolygon.h | 2 ++ src/Mod/Part/Gui/ViewProviderRuledSurface.cpp | 1 - src/Mod/Part/Gui/ViewProviderRuledSurface.h | 2 ++ src/Mod/Part/Gui/ViewProviderScale.cpp | 1 - src/Mod/Part/Gui/ViewProviderScale.h | 2 ++ .../Part/Gui/ViewProviderSphereParametric.cpp | 1 - .../Part/Gui/ViewProviderSphereParametric.h | 2 ++ src/Mod/Part/Gui/ViewProviderSpline.cpp | 3 --- src/Mod/Part/Gui/ViewProviderSpline.h | 2 ++ .../Part/Gui/ViewProviderTorusParametric.cpp | 1 - .../Part/Gui/ViewProviderTorusParametric.h | 2 ++ src/Mod/Part/Gui/Workbench.cpp | 1 - src/Mod/Part/Gui/WorkbenchManipulator.cpp | 1 - 337 files changed, 425 insertions(+), 781 deletions(-) delete mode 100644 src/Mod/Part/App/PreCompiled.cpp delete mode 100644 src/Mod/Part/Gui/PreCompiled.cpp diff --git a/src/Mod/Part/App/AppPart.cpp b/src/Mod/Part/App/AppPart.cpp index 5da58f1c97..9b664e05a9 100644 --- a/src/Mod/Part/App/AppPart.cpp +++ b/src/Mod/Part/App/AppPart.cpp @@ -21,13 +21,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + +#include #include #include diff --git a/src/Mod/Part/App/AppPartPy.cpp b/src/Mod/Part/App/AppPartPy.cpp index 0c156338c5..a16bd12b5e 100644 --- a/src/Mod/Part/App/AppPartPy.cpp +++ b/src/Mod/Part/App/AppPartPy.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -68,7 +66,7 @@ # include # include # include -#endif + # include #include diff --git a/src/Mod/Part/App/ArcOfCirclePyImp.cpp b/src/Mod/Part/App/ArcOfCirclePyImp.cpp index 16ce6a60d1..0fdbbbaa41 100644 --- a/src/Mod/Part/App/ArcOfCirclePyImp.cpp +++ b/src/Mod/Part/App/ArcOfCirclePyImp.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include diff --git a/src/Mod/Part/App/ArcOfConicPyImp.cpp b/src/Mod/Part/App/ArcOfConicPyImp.cpp index 68124dbc60..7d58354425 100644 --- a/src/Mod/Part/App/ArcOfConicPyImp.cpp +++ b/src/Mod/Part/App/ArcOfConicPyImp.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/Part/App/ArcOfEllipsePyImp.cpp b/src/Mod/Part/App/ArcOfEllipsePyImp.cpp index 5da26a8cf3..40a26d8806 100644 --- a/src/Mod/Part/App/ArcOfEllipsePyImp.cpp +++ b/src/Mod/Part/App/ArcOfEllipsePyImp.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include "ArcOfEllipsePy.h" #include "ArcOfEllipsePy.cpp" diff --git a/src/Mod/Part/App/ArcOfHyperbolaPyImp.cpp b/src/Mod/Part/App/ArcOfHyperbolaPyImp.cpp index 2df2ab7b35..01cb27abf4 100644 --- a/src/Mod/Part/App/ArcOfHyperbolaPyImp.cpp +++ b/src/Mod/Part/App/ArcOfHyperbolaPyImp.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include "ArcOfHyperbolaPy.h" #include "ArcOfHyperbolaPy.cpp" diff --git a/src/Mod/Part/App/ArcOfParabolaPyImp.cpp b/src/Mod/Part/App/ArcOfParabolaPyImp.cpp index 12cd2ee609..dcdc6598d0 100644 --- a/src/Mod/Part/App/ArcOfParabolaPyImp.cpp +++ b/src/Mod/Part/App/ArcOfParabolaPyImp.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include "ArcOfParabolaPy.h" #include "ArcOfParabolaPy.cpp" diff --git a/src/Mod/Part/App/ArcPyImp.cpp b/src/Mod/Part/App/ArcPyImp.cpp index 8ccf6627ab..b09de70bd2 100644 --- a/src/Mod/Part/App/ArcPyImp.cpp +++ b/src/Mod/Part/App/ArcPyImp.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -30,7 +28,7 @@ # include # include # include -#endif + #include diff --git a/src/Mod/Part/App/AttachEnginePyImp.cpp b/src/Mod/Part/App/AttachEnginePyImp.cpp index 761f3877ab..af581948f3 100644 --- a/src/Mod/Part/App/AttachEnginePyImp.cpp +++ b/src/Mod/Part/App/AttachEnginePyImp.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/Part/App/AttachExtension.cpp b/src/Mod/Part/App/AttachExtension.cpp index 740f9e254b..47518e0944 100644 --- a/src/Mod/Part/App/AttachExtension.cpp +++ b/src/Mod/Part/App/AttachExtension.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Part/App/AttachExtension.h b/src/Mod/Part/App/AttachExtension.h index 3418de74ae..6107191fe3 100644 --- a/src/Mod/Part/App/AttachExtension.h +++ b/src/Mod/Part/App/AttachExtension.h @@ -34,6 +34,8 @@ #include #include +#include + #include "Attacher.h" diff --git a/src/Mod/Part/App/AttachExtensionPyImp.cpp b/src/Mod/Part/App/AttachExtensionPyImp.cpp index de1c82b3dc..6a9d40b3c0 100644 --- a/src/Mod/Part/App/AttachExtensionPyImp.cpp +++ b/src/Mod/Part/App/AttachExtensionPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "AttachExtensionPy.h" #include "AttachExtensionPy.cpp" diff --git a/src/Mod/Part/App/Attacher.cpp b/src/Mod/Part/App/Attacher.cpp index 38f81a336f..22bf0d7734 100644 --- a/src/Mod/Part/App/Attacher.cpp +++ b/src/Mod/Part/App/Attacher.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -61,7 +59,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/Part/App/Attacher.h b/src/Mod/Part/App/Attacher.h index 206719c27d..113dfccf38 100644 --- a/src/Mod/Part/App/Attacher.h +++ b/src/Mod/Part/App/Attacher.h @@ -37,6 +37,8 @@ #include #include +#include + #include "PartFeature.h" diff --git a/src/Mod/Part/App/BRepFeat/MakePrismPyImp.cpp b/src/Mod/Part/App/BRepFeat/MakePrismPyImp.cpp index c52aad5e17..82871c6bda 100644 --- a/src/Mod/Part/App/BRepFeat/MakePrismPyImp.cpp +++ b/src/Mod/Part/App/BRepFeat/MakePrismPyImp.cpp @@ -20,12 +20,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/BRepMesh.cpp b/src/Mod/Part/App/BRepMesh.cpp index 1f1dd87246..96a658593b 100644 --- a/src/Mod/Part/App/BRepMesh.cpp +++ b/src/Mod/Part/App/BRepMesh.cpp @@ -22,11 +22,9 @@ **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include "BRepMesh.h" #include diff --git a/src/Mod/Part/App/BRepOffsetAPI_MakeFillingPyImp.cpp b/src/Mod/Part/App/BRepOffsetAPI_MakeFillingPyImp.cpp index cf7ac2ee10..0d5f719d48 100644 --- a/src/Mod/Part/App/BRepOffsetAPI_MakeFillingPyImp.cpp +++ b/src/Mod/Part/App/BRepOffsetAPI_MakeFillingPyImp.cpp @@ -20,15 +20,15 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/BRepOffsetAPI_MakeOffsetFix.cpp b/src/Mod/Part/App/BRepOffsetAPI_MakeOffsetFix.cpp index 4b2ff90fac..fa6d4f9fe2 100644 --- a/src/Mod/Part/App/BRepOffsetAPI_MakeOffsetFix.cpp +++ b/src/Mod/Part/App/BRepOffsetAPI_MakeOffsetFix.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -40,7 +38,7 @@ # include # include # include -#endif + #include "BRepOffsetAPI_MakeOffsetFix.h" diff --git a/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp b/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp index 9167f3bb0c..b61987e8f2 100644 --- a/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp +++ b/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp @@ -20,8 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include # include @@ -29,7 +29,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/BSplineCurveBiArcs.cpp b/src/Mod/Part/App/BSplineCurveBiArcs.cpp index ecf5a130dd..cfde034810 100644 --- a/src/Mod/Part/App/BSplineCurveBiArcs.cpp +++ b/src/Mod/Part/App/BSplineCurveBiArcs.cpp @@ -27,13 +27,11 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include "BSplineCurveBiArcs.h" #include "Geometry.h" diff --git a/src/Mod/Part/App/BSplineCurvePyImp.cpp b/src/Mod/Part/App/BSplineCurvePyImp.cpp index 64edcf022d..e94cdb5005 100644 --- a/src/Mod/Part/App/BSplineCurvePyImp.cpp +++ b/src/Mod/Part/App/BSplineCurvePyImp.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -36,7 +34,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/BSplineSurfacePyImp.cpp b/src/Mod/Part/App/BSplineSurfacePyImp.cpp index 12aa95d8dd..6aaaa4bff6 100644 --- a/src/Mod/Part/App/BSplineSurfacePyImp.cpp +++ b/src/Mod/Part/App/BSplineSurfacePyImp.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -31,7 +29,7 @@ # include # include # include -#endif + # include #include diff --git a/src/Mod/Part/App/BezierCurvePyImp.cpp b/src/Mod/Part/App/BezierCurvePyImp.cpp index 44e2f590d3..2cdaff92aa 100644 --- a/src/Mod/Part/App/BezierCurvePyImp.cpp +++ b/src/Mod/Part/App/BezierCurvePyImp.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -29,7 +27,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/BezierSurfacePyImp.cpp b/src/Mod/Part/App/BezierSurfacePyImp.cpp index 1c59c6f33d..0608e87bd4 100644 --- a/src/Mod/Part/App/BezierSurfacePyImp.cpp +++ b/src/Mod/Part/App/BezierSurfacePyImp.cpp @@ -20,14 +20,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/BodyBase.cpp b/src/Mod/Part/App/BodyBase.cpp index d88741e1ea..78b3f206f9 100644 --- a/src/Mod/Part/App/BodyBase.cpp +++ b/src/Mod/Part/App/BodyBase.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/Part/App/BodyBase.h b/src/Mod/Part/App/BodyBase.h index f9edbcf991..b8aaf696a5 100644 --- a/src/Mod/Part/App/BodyBase.h +++ b/src/Mod/Part/App/BodyBase.h @@ -26,6 +26,8 @@ #include #include +#include + #include "PartFeature.h" diff --git a/src/Mod/Part/App/BodyBasePyImp.cpp b/src/Mod/Part/App/BodyBasePyImp.cpp index 67ba5bebf9..26f81caf7b 100644 --- a/src/Mod/Part/App/BodyBasePyImp.cpp +++ b/src/Mod/Part/App/BodyBasePyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "BodyBase.h" // inclusion of the generated files (generated out of ItemPy.xml) diff --git a/src/Mod/Part/App/BoundedCurvePyImp.cpp b/src/Mod/Part/App/BoundedCurvePyImp.cpp index f6e8adff2a..c4f22cb8c4 100644 --- a/src/Mod/Part/App/BoundedCurvePyImp.cpp +++ b/src/Mod/Part/App/BoundedCurvePyImp.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include diff --git a/src/Mod/Part/App/CMakeLists.txt b/src/Mod/Part/App/CMakeLists.txt index 79c6712bce..02a0b582d9 100644 --- a/src/Mod/Part/App/CMakeLists.txt +++ b/src/Mod/Part/App/CMakeLists.txt @@ -562,7 +562,6 @@ SET(Part_SRCS ImportStep.h Interface.cpp Interface.h - PreCompiled.cpp PreCompiled.h Services.cpp Services.h @@ -598,9 +597,9 @@ SET(Part_SRCS ) if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${Part_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(Part PreCompiled.h PreCompiled.cpp PCH_SRCS) + target_precompile_headers(Part PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) endif(FREECAD_USE_PCH) # Suppress some very long Eigen3 warnings of older versions diff --git a/src/Mod/Part/App/ChFi2d/ChFi2d_AnaFilletAlgoPyImp.cpp b/src/Mod/Part/App/ChFi2d/ChFi2d_AnaFilletAlgoPyImp.cpp index 29c90c7eac..b54f7cb732 100644 --- a/src/Mod/Part/App/ChFi2d/ChFi2d_AnaFilletAlgoPyImp.cpp +++ b/src/Mod/Part/App/ChFi2d/ChFi2d_AnaFilletAlgoPyImp.cpp @@ -20,12 +20,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include # include -#endif + #include "ChFi2d/ChFi2d_AnaFilletAlgoPy.h" #include "ChFi2d/ChFi2d_AnaFilletAlgoPy.cpp" diff --git a/src/Mod/Part/App/ChFi2d/ChFi2d_ChamferAPIPyImp.cpp b/src/Mod/Part/App/ChFi2d/ChFi2d_ChamferAPIPyImp.cpp index 39e7f581e8..bb0a5f4d91 100644 --- a/src/Mod/Part/App/ChFi2d/ChFi2d_ChamferAPIPyImp.cpp +++ b/src/Mod/Part/App/ChFi2d/ChFi2d_ChamferAPIPyImp.cpp @@ -20,12 +20,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include # include -#endif + #include "ChFi2d/ChFi2d_ChamferAPIPy.h" #include "ChFi2d/ChFi2d_ChamferAPIPy.cpp" diff --git a/src/Mod/Part/App/ChFi2d/ChFi2d_FilletAPIPyImp.cpp b/src/Mod/Part/App/ChFi2d/ChFi2d_FilletAPIPyImp.cpp index 30980f2bbf..559a428fa2 100644 --- a/src/Mod/Part/App/ChFi2d/ChFi2d_FilletAPIPyImp.cpp +++ b/src/Mod/Part/App/ChFi2d/ChFi2d_FilletAPIPyImp.cpp @@ -20,12 +20,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include # include -#endif + #include diff --git a/src/Mod/Part/App/ChFi2d/ChFi2d_FilletAlgoPyImp.cpp b/src/Mod/Part/App/ChFi2d/ChFi2d_FilletAlgoPyImp.cpp index 1e6a480d9c..01400fd35f 100644 --- a/src/Mod/Part/App/ChFi2d/ChFi2d_FilletAlgoPyImp.cpp +++ b/src/Mod/Part/App/ChFi2d/ChFi2d_FilletAlgoPyImp.cpp @@ -20,13 +20,13 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include # include # include -#endif + #include diff --git a/src/Mod/Part/App/CirclePyImp.cpp b/src/Mod/Part/App/CirclePyImp.cpp index d515f8f43a..124b804ecd 100644 --- a/src/Mod/Part/App/CirclePyImp.cpp +++ b/src/Mod/Part/App/CirclePyImp.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/ConePyImp.cpp b/src/Mod/Part/App/ConePyImp.cpp index b4a4241a75..81a50791bf 100644 --- a/src/Mod/Part/App/ConePyImp.cpp +++ b/src/Mod/Part/App/ConePyImp.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/ConicPyImp.cpp b/src/Mod/Part/App/ConicPyImp.cpp index 685f8f0869..e84fda0389 100644 --- a/src/Mod/Part/App/ConicPyImp.cpp +++ b/src/Mod/Part/App/ConicPyImp.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/Part/App/CrossSection.cpp b/src/Mod/Part/App/CrossSection.cpp index eb0ba3b0f8..79c507063f 100644 --- a/src/Mod/Part/App/CrossSection.cpp +++ b/src/Mod/Part/App/CrossSection.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -41,7 +39,7 @@ # include # include # include -#endif + #include "CrossSection.h" #include "TopoShapeOpCode.h" diff --git a/src/Mod/Part/App/CustomFeature.cpp b/src/Mod/Part/App/CustomFeature.cpp index 7325da815c..11fb35a068 100644 --- a/src/Mod/Part/App/CustomFeature.cpp +++ b/src/Mod/Part/App/CustomFeature.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "CustomFeature.h" diff --git a/src/Mod/Part/App/CustomFeature.h b/src/Mod/Part/App/CustomFeature.h index f76bf7a388..a0d77ff13a 100644 --- a/src/Mod/Part/App/CustomFeature.h +++ b/src/Mod/Part/App/CustomFeature.h @@ -24,6 +24,8 @@ #ifndef PART_CUSTOMFEATURE_H #define PART_CUSTOMFEATURE_H +#include + #include namespace Part diff --git a/src/Mod/Part/App/CylinderPyImp.cpp b/src/Mod/Part/App/CylinderPyImp.cpp index 0972fc11e1..2a1eae2c43 100644 --- a/src/Mod/Part/App/CylinderPyImp.cpp +++ b/src/Mod/Part/App/CylinderPyImp.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/DatumFeature.cpp b/src/Mod/Part/App/DatumFeature.cpp index c24e3e2276..dbceb98b81 100644 --- a/src/Mod/Part/App/DatumFeature.cpp +++ b/src/Mod/Part/App/DatumFeature.cpp @@ -21,7 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "DatumFeature.h" #include "OCCError.h" diff --git a/src/Mod/Part/App/DatumFeature.h b/src/Mod/Part/App/DatumFeature.h index bc665cb92d..5fa12b412b 100644 --- a/src/Mod/Part/App/DatumFeature.h +++ b/src/Mod/Part/App/DatumFeature.h @@ -24,6 +24,8 @@ #ifndef PART_DATUMFEATURE_H #define PART_DATUMFEATURE_H +#include + #include "AttachExtension.h" diff --git a/src/Mod/Part/App/Datums.cpp b/src/Mod/Part/App/Datums.cpp index 5ec1d79abb..899e1f5bd2 100644 --- a/src/Mod/Part/App/Datums.cpp +++ b/src/Mod/Part/App/Datums.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "Datums.h" diff --git a/src/Mod/Part/App/Datums.h b/src/Mod/Part/App/Datums.h index 06f35c865f..f149e61cb5 100644 --- a/src/Mod/Part/App/Datums.h +++ b/src/Mod/Part/App/Datums.h @@ -25,6 +25,8 @@ #include +#include + #include "AttachExtension.h" namespace Part diff --git a/src/Mod/Part/App/EllipsePyImp.cpp b/src/Mod/Part/App/EllipsePyImp.cpp index 405e061ff8..b4c06fcb67 100644 --- a/src/Mod/Part/App/EllipsePyImp.cpp +++ b/src/Mod/Part/App/EllipsePyImp.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/ExtrusionHelper.cpp b/src/Mod/Part/App/ExtrusionHelper.cpp index d09a40c3da..de4a53381f 100644 --- a/src/Mod/Part/App/ExtrusionHelper.cpp +++ b/src/Mod/Part/App/ExtrusionHelper.cpp @@ -20,8 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include # include @@ -37,7 +37,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/FT2FC.cpp b/src/Mod/Part/App/FT2FC.cpp index 54024bb5f0..fc26b04b61 100644 --- a/src/Mod/Part/App/FT2FC.cpp +++ b/src/Mod/Part/App/FT2FC.cpp @@ -25,11 +25,10 @@ * Project (www.freetype.org). All rights reserved. * ***************************************************************************/ -#include "PreCompiled.h" +#include #ifdef FCUseFreeType -#ifndef _PreComp_ # include # include # include @@ -55,7 +54,6 @@ # include # include # include -#endif // _PreComp #include #include diff --git a/src/Mod/Part/App/FaceMaker.cpp b/src/Mod/Part/App/FaceMaker.cpp index b2cc941540..2d3207f061 100644 --- a/src/Mod/Part/App/FaceMaker.cpp +++ b/src/Mod/Part/App/FaceMaker.cpp @@ -20,15 +20,13 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include # include -#endif + #include diff --git a/src/Mod/Part/App/FaceMakerBullseye.cpp b/src/Mod/Part/App/FaceMakerBullseye.cpp index b08f7af3ea..02e84a74e6 100644 --- a/src/Mod/Part/App/FaceMakerBullseye.cpp +++ b/src/Mod/Part/App/FaceMakerBullseye.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -38,7 +36,6 @@ # include # include # include -#endif #include "FaceMakerBullseye.h" #include "FaceMakerCheese.h" diff --git a/src/Mod/Part/App/FaceMakerBullseye.h b/src/Mod/Part/App/FaceMakerBullseye.h index b7b9235243..362902da23 100644 --- a/src/Mod/Part/App/FaceMakerBullseye.h +++ b/src/Mod/Part/App/FaceMakerBullseye.h @@ -29,6 +29,7 @@ #include #include +#include namespace Part { diff --git a/src/Mod/Part/App/FaceMakerCheese.cpp b/src/Mod/Part/App/FaceMakerCheese.cpp index 8db278aaef..aaab156be4 100644 --- a/src/Mod/Part/App/FaceMakerCheese.cpp +++ b/src/Mod/Part/App/FaceMakerCheese.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -43,7 +41,7 @@ # include # include # include -#endif + #include "FaceMakerCheese.h" diff --git a/src/Mod/Part/App/FaceMakerCheese.h b/src/Mod/Part/App/FaceMakerCheese.h index db191889a4..073d0bb807 100644 --- a/src/Mod/Part/App/FaceMakerCheese.h +++ b/src/Mod/Part/App/FaceMakerCheese.h @@ -26,6 +26,8 @@ #include "FaceMaker.h" #include +#include + namespace Part { diff --git a/src/Mod/Part/App/FeatureChamfer.cpp b/src/Mod/Part/App/FeatureChamfer.cpp index 6942058164..fe5ada000b 100644 --- a/src/Mod/Part/App/FeatureChamfer.cpp +++ b/src/Mod/Part/App/FeatureChamfer.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -29,7 +27,7 @@ # include # include # include -#endif + #include "FeatureChamfer.h" #include "TopoShapeOpCode.h" diff --git a/src/Mod/Part/App/FeatureChamfer.h b/src/Mod/Part/App/FeatureChamfer.h index b9fe53108d..7a54fd06fb 100644 --- a/src/Mod/Part/App/FeatureChamfer.h +++ b/src/Mod/Part/App/FeatureChamfer.h @@ -25,6 +25,7 @@ #include "PartFeature.h" +#include namespace Part { diff --git a/src/Mod/Part/App/FeatureCompound.cpp b/src/Mod/Part/App/FeatureCompound.cpp index 70fe457337..78de2e2237 100644 --- a/src/Mod/Part/App/FeatureCompound.cpp +++ b/src/Mod/Part/App/FeatureCompound.cpp @@ -20,14 +20,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include -#endif + #include "FeatureCompound.h" diff --git a/src/Mod/Part/App/FeatureCompound.h b/src/Mod/Part/App/FeatureCompound.h index 916c1ec6d5..65fcd6a289 100644 --- a/src/Mod/Part/App/FeatureCompound.h +++ b/src/Mod/Part/App/FeatureCompound.h @@ -24,6 +24,9 @@ #define PART_FEATURECOMPOUND_H #include + +#include + #include "PartFeature.h" diff --git a/src/Mod/Part/App/FeatureExtrusion.cpp b/src/Mod/Part/App/FeatureExtrusion.cpp index c3f0793f07..ad7b1f578a 100644 --- a/src/Mod/Part/App/FeatureExtrusion.cpp +++ b/src/Mod/Part/App/FeatureExtrusion.cpp @@ -20,8 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include # include @@ -35,7 +35,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/FeatureExtrusion.h b/src/Mod/Part/App/FeatureExtrusion.h index 941e72fb20..1b06d6eb9e 100644 --- a/src/Mod/Part/App/FeatureExtrusion.h +++ b/src/Mod/Part/App/FeatureExtrusion.h @@ -25,8 +25,10 @@ #include #include - #include + +#include + #include "FaceMakerCheese.h" #include "PartFeature.h" #include "ExtrusionHelper.h" diff --git a/src/Mod/Part/App/FeatureFace.cpp b/src/Mod/Part/App/FeatureFace.cpp index 3ea1908c4f..c2497dc2f5 100644 --- a/src/Mod/Part/App/FeatureFace.cpp +++ b/src/Mod/Part/App/FeatureFace.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include "FeatureFace.h" #include "FaceMaker.h" diff --git a/src/Mod/Part/App/FeatureFace.h b/src/Mod/Part/App/FeatureFace.h index b0f3d2eb26..2a49927f95 100644 --- a/src/Mod/Part/App/FeatureFace.h +++ b/src/Mod/Part/App/FeatureFace.h @@ -23,6 +23,8 @@ #ifndef PART_FACE_H #define PART_FACE_H +#include + #include "PartFeature.h" diff --git a/src/Mod/Part/App/FeatureFillet.cpp b/src/Mod/Part/App/FeatureFillet.cpp index 13229cd652..945a12124e 100644 --- a/src/Mod/Part/App/FeatureFillet.cpp +++ b/src/Mod/Part/App/FeatureFillet.cpp @@ -20,8 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include # include @@ -29,7 +29,7 @@ # include # include # include -#endif + #include diff --git a/src/Mod/Part/App/FeatureFillet.h b/src/Mod/Part/App/FeatureFillet.h index 08d79f593e..727895bd9b 100644 --- a/src/Mod/Part/App/FeatureFillet.h +++ b/src/Mod/Part/App/FeatureFillet.h @@ -23,6 +23,8 @@ #ifndef PART_FEATUREFILLET_H #define PART_FEATUREFILLET_H +#include + #include "PartFeature.h" diff --git a/src/Mod/Part/App/FeatureGeometrySet.cpp b/src/Mod/Part/App/FeatureGeometrySet.cpp index 41f83f84b8..e05af68fac 100644 --- a/src/Mod/Part/App/FeatureGeometrySet.cpp +++ b/src/Mod/Part/App/FeatureGeometrySet.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "FeatureGeometrySet.h" diff --git a/src/Mod/Part/App/FeatureGeometrySet.h b/src/Mod/Part/App/FeatureGeometrySet.h index 27343bccb5..4b6917715b 100644 --- a/src/Mod/Part/App/FeatureGeometrySet.h +++ b/src/Mod/Part/App/FeatureGeometrySet.h @@ -23,6 +23,8 @@ #ifndef PART_FeatureGeometrySet_H #define PART_FeatureGeometrySet_H +#include + #include "PartFeature.h" #include "PropertyGeometryList.h" diff --git a/src/Mod/Part/App/FeatureMirroring.cpp b/src/Mod/Part/App/FeatureMirroring.cpp index ac02e9a4f9..921d11226d 100644 --- a/src/Mod/Part/App/FeatureMirroring.cpp +++ b/src/Mod/Part/App/FeatureMirroring.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -36,7 +34,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/FeatureMirroring.h b/src/Mod/Part/App/FeatureMirroring.h index dcfb671851..d4e6da9473 100644 --- a/src/Mod/Part/App/FeatureMirroring.h +++ b/src/Mod/Part/App/FeatureMirroring.h @@ -25,6 +25,8 @@ #include +#include + #include "PartFeature.h" diff --git a/src/Mod/Part/App/FeatureOffset.cpp b/src/Mod/Part/App/FeatureOffset.cpp index 3cffec03fd..f1c46cff21 100644 --- a/src/Mod/Part/App/FeatureOffset.cpp +++ b/src/Mod/Part/App/FeatureOffset.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include diff --git a/src/Mod/Part/App/FeatureOffset.h b/src/Mod/Part/App/FeatureOffset.h index ee3f6769a2..4fc01a827e 100644 --- a/src/Mod/Part/App/FeatureOffset.h +++ b/src/Mod/Part/App/FeatureOffset.h @@ -25,6 +25,8 @@ #include +#include + #include "PartFeature.h" diff --git a/src/Mod/Part/App/FeaturePartBoolean.cpp b/src/Mod/Part/App/FeaturePartBoolean.cpp index ec2b21c331..5e2c2a51e2 100644 --- a/src/Mod/Part/App/FeaturePartBoolean.cpp +++ b/src/Mod/Part/App/FeaturePartBoolean.cpp @@ -20,14 +20,13 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include # include # include -#endif #include #include diff --git a/src/Mod/Part/App/FeaturePartBoolean.h b/src/Mod/Part/App/FeaturePartBoolean.h index 32092b35ac..3f8b5471ee 100644 --- a/src/Mod/Part/App/FeaturePartBoolean.h +++ b/src/Mod/Part/App/FeaturePartBoolean.h @@ -25,6 +25,9 @@ #define PART_FEATUREPARTBOOLEAN_H #include + +#include + #include "PartFeature.h" class FCBRepAlgoAPI_BooleanOperation; diff --git a/src/Mod/Part/App/FeaturePartBox.cpp b/src/Mod/Part/App/FeaturePartBox.cpp index dd3608a170..c32b5b5c4e 100644 --- a/src/Mod/Part/App/FeaturePartBox.cpp +++ b/src/Mod/Part/App/FeaturePartBox.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include diff --git a/src/Mod/Part/App/FeaturePartBox.h b/src/Mod/Part/App/FeaturePartBox.h index bc3e7c4a05..927d095dbe 100644 --- a/src/Mod/Part/App/FeaturePartBox.h +++ b/src/Mod/Part/App/FeaturePartBox.h @@ -25,6 +25,8 @@ #include +#include + #include "PrimitiveFeature.h" diff --git a/src/Mod/Part/App/FeaturePartCircle.cpp b/src/Mod/Part/App/FeaturePartCircle.cpp index 33f11d5601..64225b7807 100644 --- a/src/Mod/Part/App/FeaturePartCircle.cpp +++ b/src/Mod/Part/App/FeaturePartCircle.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include diff --git a/src/Mod/Part/App/FeaturePartCircle.h b/src/Mod/Part/App/FeaturePartCircle.h index f880f52099..e2b84d0517 100644 --- a/src/Mod/Part/App/FeaturePartCircle.h +++ b/src/Mod/Part/App/FeaturePartCircle.h @@ -25,8 +25,9 @@ #include -#include "PrimitiveFeature.h" +#include +#include "PrimitiveFeature.h" namespace Part { diff --git a/src/Mod/Part/App/FeaturePartCommon.cpp b/src/Mod/Part/App/FeaturePartCommon.cpp index ed61ca0529..ecb5320b25 100644 --- a/src/Mod/Part/App/FeaturePartCommon.cpp +++ b/src/Mod/Part/App/FeaturePartCommon.cpp @@ -20,15 +20,13 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include # include -#endif + #include "FeaturePartCommon.h" #include "TopoShapeOpCode.h" diff --git a/src/Mod/Part/App/FeaturePartCommon.h b/src/Mod/Part/App/FeaturePartCommon.h index b04c028306..fb88a7e03c 100644 --- a/src/Mod/Part/App/FeaturePartCommon.h +++ b/src/Mod/Part/App/FeaturePartCommon.h @@ -23,6 +23,8 @@ #ifndef PART_FEATUREPARTCOMMON_H #define PART_FEATUREPARTCOMMON_H +#include + #include "FeaturePartBoolean.h" diff --git a/src/Mod/Part/App/FeaturePartCurveNet.cpp b/src/Mod/Part/App/FeaturePartCurveNet.cpp index 245ea2036b..aae7ad84a5 100644 --- a/src/Mod/Part/App/FeaturePartCurveNet.cpp +++ b/src/Mod/Part/App/FeaturePartCurveNet.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/Part/App/FeaturePartCut.cpp b/src/Mod/Part/App/FeaturePartCut.cpp index 8f5523131b..2886ccab14 100644 --- a/src/Mod/Part/App/FeaturePartCut.cpp +++ b/src/Mod/Part/App/FeaturePartCut.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include "FeaturePartCut.h" #include "TopoShapeOpCode.h" diff --git a/src/Mod/Part/App/FeaturePartFuse.cpp b/src/Mod/Part/App/FeaturePartFuse.cpp index 3c9ceb579f..6b13a75bb2 100644 --- a/src/Mod/Part/App/FeaturePartFuse.cpp +++ b/src/Mod/Part/App/FeaturePartFuse.cpp @@ -20,15 +20,13 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include # include -#endif + #include "FeaturePartFuse.h" #include "TopoShape.h" diff --git a/src/Mod/Part/App/FeaturePartFuse.h b/src/Mod/Part/App/FeaturePartFuse.h index 18f659bb29..b8a5a1ebcd 100644 --- a/src/Mod/Part/App/FeaturePartFuse.h +++ b/src/Mod/Part/App/FeaturePartFuse.h @@ -23,6 +23,8 @@ #ifndef PART_FEATUREPARTFUSE_H #define PART_FEATUREPARTFUSE_H +#include + #include "FeaturePartBoolean.h" diff --git a/src/Mod/Part/App/FeaturePartImportBrep.cpp b/src/Mod/Part/App/FeaturePartImportBrep.cpp index 068761986b..76864a2b7e 100644 --- a/src/Mod/Part/App/FeaturePartImportBrep.cpp +++ b/src/Mod/Part/App/FeaturePartImportBrep.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/Part/App/FeaturePartImportIges.cpp b/src/Mod/Part/App/FeaturePartImportIges.cpp index 2ffe9d400d..38f34bfaca 100644 --- a/src/Mod/Part/App/FeaturePartImportIges.cpp +++ b/src/Mod/Part/App/FeaturePartImportIges.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/Part/App/FeaturePartImportStep.cpp b/src/Mod/Part/App/FeaturePartImportStep.cpp index 4cf53c3d70..75e9996d4d 100644 --- a/src/Mod/Part/App/FeaturePartImportStep.cpp +++ b/src/Mod/Part/App/FeaturePartImportStep.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/Part/App/FeaturePartPolygon.cpp b/src/Mod/Part/App/FeaturePartPolygon.cpp index 84390e8f9f..673381293e 100644 --- a/src/Mod/Part/App/FeaturePartPolygon.cpp +++ b/src/Mod/Part/App/FeaturePartPolygon.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include "FeaturePartPolygon.h" diff --git a/src/Mod/Part/App/FeaturePartSection.cpp b/src/Mod/Part/App/FeaturePartSection.cpp index deddc79454..8ed71467be 100644 --- a/src/Mod/Part/App/FeaturePartSection.cpp +++ b/src/Mod/Part/App/FeaturePartSection.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include "FeaturePartSection.h" #include "TopoShapeOpCode.h" diff --git a/src/Mod/Part/App/FeaturePartSpline.cpp b/src/Mod/Part/App/FeaturePartSpline.cpp index 28ae519de8..cb4da5e645 100644 --- a/src/Mod/Part/App/FeaturePartSpline.cpp +++ b/src/Mod/Part/App/FeaturePartSpline.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "FeaturePartSpline.h" diff --git a/src/Mod/Part/App/FeaturePartSpline.h b/src/Mod/Part/App/FeaturePartSpline.h index 5bdc765dab..62e6dcbdf8 100644 --- a/src/Mod/Part/App/FeaturePartSpline.h +++ b/src/Mod/Part/App/FeaturePartSpline.h @@ -23,6 +23,8 @@ #ifndef PART_FEATUREPARTSPLINE_H #define PART_FEATUREPARTSPLINE_H +#include + #include "PartFeature.h" diff --git a/src/Mod/Part/App/FeatureProjectOnSurface.cpp b/src/Mod/Part/App/FeatureProjectOnSurface.cpp index 957152dc45..c3421ee17f 100644 --- a/src/Mod/Part/App/FeatureProjectOnSurface.cpp +++ b/src/Mod/Part/App/FeatureProjectOnSurface.cpp @@ -22,8 +22,6 @@ * * **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -43,7 +41,7 @@ #include #include #include -#endif + #include "FeatureProjectOnSurface.h" #include diff --git a/src/Mod/Part/App/FeatureProjectOnSurface.h b/src/Mod/Part/App/FeatureProjectOnSurface.h index a8bafb0433..34a6e60d49 100644 --- a/src/Mod/Part/App/FeatureProjectOnSurface.h +++ b/src/Mod/Part/App/FeatureProjectOnSurface.h @@ -29,6 +29,7 @@ #include #include +#include namespace Part { diff --git a/src/Mod/Part/App/FeatureRevolution.cpp b/src/Mod/Part/App/FeatureRevolution.cpp index 425bde2cb0..505d65dab3 100644 --- a/src/Mod/Part/App/FeatureRevolution.cpp +++ b/src/Mod/Part/App/FeatureRevolution.cpp @@ -20,15 +20,13 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/FeatureRevolution.h b/src/Mod/Part/App/FeatureRevolution.h index aed3e9e1f5..fba896c64e 100644 --- a/src/Mod/Part/App/FeatureRevolution.h +++ b/src/Mod/Part/App/FeatureRevolution.h @@ -26,6 +26,8 @@ #include #include +#include + #include "PartFeature.h" diff --git a/src/Mod/Part/App/FeatureScale.cpp b/src/Mod/Part/App/FeatureScale.cpp index ee5bcece24..67f8e297c4 100644 --- a/src/Mod/Part/App/FeatureScale.cpp +++ b/src/Mod/Part/App/FeatureScale.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -29,7 +27,7 @@ #include #include #include -#endif + #include diff --git a/src/Mod/Part/App/FeatureScale.h b/src/Mod/Part/App/FeatureScale.h index bf0a547fa4..c53d83af58 100644 --- a/src/Mod/Part/App/FeatureScale.h +++ b/src/Mod/Part/App/FeatureScale.h @@ -26,6 +26,8 @@ #include #include +#include + #include "FaceMakerCheese.h" #include "PartFeature.h" diff --git a/src/Mod/Part/App/FuzzyHelper.cpp b/src/Mod/Part/App/FuzzyHelper.cpp index 59afcd4965..1d2548499a 100644 --- a/src/Mod/Part/App/FuzzyHelper.cpp +++ b/src/Mod/Part/App/FuzzyHelper.cpp @@ -22,7 +22,6 @@ * * **************************************************************************/ -#include "PreCompiled.h" #include using namespace Part; diff --git a/src/Mod/Part/App/Geom2d/ArcOfCircle2dPyImp.cpp b/src/Mod/Part/App/Geom2d/ArcOfCircle2dPyImp.cpp index 566b4498d7..93fac0c2d0 100644 --- a/src/Mod/Part/App/Geom2d/ArcOfCircle2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/ArcOfCircle2dPyImp.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include diff --git a/src/Mod/Part/App/Geom2d/ArcOfConic2dPyImp.cpp b/src/Mod/Part/App/Geom2d/ArcOfConic2dPyImp.cpp index c699ca5ca7..a1df6b61fe 100644 --- a/src/Mod/Part/App/Geom2d/ArcOfConic2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/ArcOfConic2dPyImp.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include diff --git a/src/Mod/Part/App/Geom2d/ArcOfEllipse2dPyImp.cpp b/src/Mod/Part/App/Geom2d/ArcOfEllipse2dPyImp.cpp index 0f92fe2d29..28b71a5dca 100644 --- a/src/Mod/Part/App/Geom2d/ArcOfEllipse2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/ArcOfEllipse2dPyImp.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include "Geom2d/ArcOfEllipse2dPy.h" #include "Geom2d/ArcOfEllipse2dPy.cpp" diff --git a/src/Mod/Part/App/Geom2d/ArcOfHyperbola2dPyImp.cpp b/src/Mod/Part/App/Geom2d/ArcOfHyperbola2dPyImp.cpp index c4807ecde9..5de5d270a3 100644 --- a/src/Mod/Part/App/Geom2d/ArcOfHyperbola2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/ArcOfHyperbola2dPyImp.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include "Geom2d/ArcOfHyperbola2dPy.h" #include "Geom2d/ArcOfHyperbola2dPy.cpp" diff --git a/src/Mod/Part/App/Geom2d/ArcOfParabola2dPyImp.cpp b/src/Mod/Part/App/Geom2d/ArcOfParabola2dPyImp.cpp index 9eaa5d93b0..29762dd2c9 100644 --- a/src/Mod/Part/App/Geom2d/ArcOfParabola2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/ArcOfParabola2dPyImp.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include "Geom2d/ArcOfParabola2dPy.h" #include "Geom2d/ArcOfParabola2dPy.cpp" diff --git a/src/Mod/Part/App/Geom2d/BSplineCurve2dPyImp.cpp b/src/Mod/Part/App/Geom2d/BSplineCurve2dPyImp.cpp index c76b9b078c..8aed4ea6c0 100644 --- a/src/Mod/Part/App/Geom2d/BSplineCurve2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/BSplineCurve2dPyImp.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -35,7 +33,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/Geom2d/BezierCurve2dPyImp.cpp b/src/Mod/Part/App/Geom2d/BezierCurve2dPyImp.cpp index bfce116651..40046604fb 100644 --- a/src/Mod/Part/App/Geom2d/BezierCurve2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/BezierCurve2dPyImp.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include diff --git a/src/Mod/Part/App/Geom2d/Circle2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Circle2dPyImp.cpp index e2a35784ed..8787abb0e5 100644 --- a/src/Mod/Part/App/Geom2d/Circle2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Circle2dPyImp.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/Geom2d/Conic2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Conic2dPyImp.cpp index 580cbf910c..fd84395991 100644 --- a/src/Mod/Part/App/Geom2d/Conic2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Conic2dPyImp.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include diff --git a/src/Mod/Part/App/Geom2d/Curve2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Curve2dPyImp.cpp index 2915d2074e..bae5642686 100644 --- a/src/Mod/Part/App/Geom2d/Curve2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Curve2dPyImp.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include @@ -51,7 +49,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/Part/App/Geom2d/Ellipse2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Ellipse2dPyImp.cpp index c535748100..294f03d32d 100644 --- a/src/Mod/Part/App/Geom2d/Ellipse2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Ellipse2dPyImp.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/Geom2d/Geometry2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Geometry2dPyImp.cpp index 3f5c634365..29c74856ea 100644 --- a/src/Mod/Part/App/Geom2d/Geometry2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Geometry2dPyImp.cpp @@ -20,14 +20,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include -#endif + #include diff --git a/src/Mod/Part/App/Geom2d/Hyperbola2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Hyperbola2dPyImp.cpp index 4d5e5b183a..24f04b83cb 100644 --- a/src/Mod/Part/App/Geom2d/Hyperbola2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Hyperbola2dPyImp.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/Geom2d/Line2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Line2dPyImp.cpp index dfa990d4ed..11e92d07c4 100644 --- a/src/Mod/Part/App/Geom2d/Line2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Line2dPyImp.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include diff --git a/src/Mod/Part/App/Geom2d/Line2dSegmentPyImp.cpp b/src/Mod/Part/App/Geom2d/Line2dSegmentPyImp.cpp index 482faeee62..c95f6a7dd1 100644 --- a/src/Mod/Part/App/Geom2d/Line2dSegmentPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Line2dSegmentPyImp.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include diff --git a/src/Mod/Part/App/Geom2d/OffsetCurve2dPyImp.cpp b/src/Mod/Part/App/Geom2d/OffsetCurve2dPyImp.cpp index 987c497ebd..5d65ee0df3 100644 --- a/src/Mod/Part/App/Geom2d/OffsetCurve2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/OffsetCurve2dPyImp.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include "Geom2d/OffsetCurve2dPy.h" #include "Geom2d/OffsetCurve2dPy.cpp" diff --git a/src/Mod/Part/App/Geom2d/Parabola2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Parabola2dPyImp.cpp index 7e31ed29b7..8c8c52e250 100644 --- a/src/Mod/Part/App/Geom2d/Parabola2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Parabola2dPyImp.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include diff --git a/src/Mod/Part/App/GeomPlate/BuildPlateSurfacePyImp.cpp b/src/Mod/Part/App/GeomPlate/BuildPlateSurfacePyImp.cpp index 761940c8ad..c5fabe4185 100644 --- a/src/Mod/Part/App/GeomPlate/BuildPlateSurfacePyImp.cpp +++ b/src/Mod/Part/App/GeomPlate/BuildPlateSurfacePyImp.cpp @@ -20,10 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include -#endif + #include "GeomPlate/BuildPlateSurfacePy.h" #include "GeomPlate/BuildPlateSurfacePy.cpp" diff --git a/src/Mod/Part/App/GeomPlate/CurveConstraintPyImp.cpp b/src/Mod/Part/App/GeomPlate/CurveConstraintPyImp.cpp index a80d414fa4..3779042721 100644 --- a/src/Mod/Part/App/GeomPlate/CurveConstraintPyImp.cpp +++ b/src/Mod/Part/App/GeomPlate/CurveConstraintPyImp.cpp @@ -20,8 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include # include @@ -30,7 +30,6 @@ # include # include # endif -#endif #include "GeomPlate/CurveConstraintPy.h" #include "GeomPlate/CurveConstraintPy.cpp" diff --git a/src/Mod/Part/App/GeomPlate/PointConstraintPyImp.cpp b/src/Mod/Part/App/GeomPlate/PointConstraintPyImp.cpp index 57f9f735fa..d43025176d 100644 --- a/src/Mod/Part/App/GeomPlate/PointConstraintPyImp.cpp +++ b/src/Mod/Part/App/GeomPlate/PointConstraintPyImp.cpp @@ -20,11 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/Geometry.cpp b/src/Mod/Part/App/Geometry.cpp index 552022e147..8a21e0b65c 100644 --- a/src/Mod/Part/App/Geometry.cpp +++ b/src/Mod/Part/App/Geometry.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -106,7 +104,6 @@ # include # include # include -#endif //_PreComp_ #include #include @@ -6420,10 +6417,10 @@ GeomArcOfCircle* createFilletGeometry(const Geometry* geo1, const Geometry* geo2 if (!geo1->isDerivedFrom() || !geo2->isDerivedFrom()) { return nullptr;// not a GeomTrimmedCurve and no coincident point. } - + auto* tcurve1 = static_cast(geo1); auto* tcurve2 = static_cast(geo2); - + try { if (!tcurve1->intersectBasisCurves(tcurve2, points)) { return nullptr; @@ -6437,9 +6434,9 @@ GeomArcOfCircle* createFilletGeometry(const Geometry* geo1, const Geometry* geo2 "a coincident constraint between the vertices of the " "curves you are intending to fillet.")) } - + int res = selectIntersection(points, interpoints, refPnt1, refPnt2); - + if (res != 0) { return nullptr; } diff --git a/src/Mod/Part/App/Geometry2d.cpp b/src/Mod/Part/App/Geometry2d.cpp index 0477d3c46e..c1824af570 100644 --- a/src/Mod/Part/App/Geometry2d.cpp +++ b/src/Mod/Part/App/Geometry2d.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -55,7 +53,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/GeometryBoolExtensionPyImp.cpp b/src/Mod/Part/App/GeometryBoolExtensionPyImp.cpp index 94f93a9ad0..418be15fe0 100644 --- a/src/Mod/Part/App/GeometryBoolExtensionPyImp.cpp +++ b/src/Mod/Part/App/GeometryBoolExtensionPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "GeometryBoolExtensionPy.h" #include "GeometryBoolExtensionPy.cpp" diff --git a/src/Mod/Part/App/GeometryCurvePyImp.cpp b/src/Mod/Part/App/GeometryCurvePyImp.cpp index 98e5e482d0..a072491894 100644 --- a/src/Mod/Part/App/GeometryCurvePyImp.cpp +++ b/src/Mod/Part/App/GeometryCurvePyImp.cpp @@ -20,10 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - -#ifndef _PreComp_ # include # include @@ -55,7 +51,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/Part/App/GeometryDefaultExtension.cpp b/src/Mod/Part/App/GeometryDefaultExtension.cpp index 8feccaf9bd..e8be2f8d3a 100644 --- a/src/Mod/Part/App/GeometryDefaultExtension.cpp +++ b/src/Mod/Part/App/GeometryDefaultExtension.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Part/App/GeometryDefaultExtension.h b/src/Mod/Part/App/GeometryDefaultExtension.h index 439c1dc229..605f7224ab 100644 --- a/src/Mod/Part/App/GeometryDefaultExtension.h +++ b/src/Mod/Part/App/GeometryDefaultExtension.h @@ -26,6 +26,8 @@ #include #include "GeometryExtension.h" +#include + namespace Part { diff --git a/src/Mod/Part/App/GeometryDoubleExtensionPyImp.cpp b/src/Mod/Part/App/GeometryDoubleExtensionPyImp.cpp index 8e9d0a2c75..54b4c38099 100644 --- a/src/Mod/Part/App/GeometryDoubleExtensionPyImp.cpp +++ b/src/Mod/Part/App/GeometryDoubleExtensionPyImp.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "GeometryDefaultExtension.h" diff --git a/src/Mod/Part/App/GeometryExtension.cpp b/src/Mod/Part/App/GeometryExtension.cpp index bdfb8b53d8..db52bdf96a 100644 --- a/src/Mod/Part/App/GeometryExtension.cpp +++ b/src/Mod/Part/App/GeometryExtension.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Part/App/GeometryExtensionPyImp.cpp b/src/Mod/Part/App/GeometryExtensionPyImp.cpp index 872393dc29..a82bb84d1e 100644 --- a/src/Mod/Part/App/GeometryExtensionPyImp.cpp +++ b/src/Mod/Part/App/GeometryExtensionPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "GeometryExtension.h" #include "GeometryExtensionPy.h" diff --git a/src/Mod/Part/App/GeometryIntExtensionPyImp.cpp b/src/Mod/Part/App/GeometryIntExtensionPyImp.cpp index 3b8cfc3e17..82d8c81a82 100644 --- a/src/Mod/Part/App/GeometryIntExtensionPyImp.cpp +++ b/src/Mod/Part/App/GeometryIntExtensionPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "GeometryIntExtensionPy.h" #include "GeometryIntExtensionPy.cpp" diff --git a/src/Mod/Part/App/GeometryMigrationExtension.cpp b/src/Mod/Part/App/GeometryMigrationExtension.cpp index 43388eeecc..5f8c3089b8 100644 --- a/src/Mod/Part/App/GeometryMigrationExtension.cpp +++ b/src/Mod/Part/App/GeometryMigrationExtension.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/Part/App/GeometryMigrationExtension.h b/src/Mod/Part/App/GeometryMigrationExtension.h index 59375ee4f3..b9e5c15c6e 100644 --- a/src/Mod/Part/App/GeometryMigrationExtension.h +++ b/src/Mod/Part/App/GeometryMigrationExtension.h @@ -26,6 +26,7 @@ #include #include "Geometry.h" +#include namespace Part { diff --git a/src/Mod/Part/App/GeometryPyImp.cpp b/src/Mod/Part/App/GeometryPyImp.cpp index 6772437caf..00612801e8 100644 --- a/src/Mod/Part/App/GeometryPyImp.cpp +++ b/src/Mod/Part/App/GeometryPyImp.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/Part/App/GeometryStringExtensionPyImp.cpp b/src/Mod/Part/App/GeometryStringExtensionPyImp.cpp index 01e3f1621a..4045ed0a81 100644 --- a/src/Mod/Part/App/GeometryStringExtensionPyImp.cpp +++ b/src/Mod/Part/App/GeometryStringExtensionPyImp.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include "GeometryStringExtensionPy.h" #include "GeometryStringExtensionPy.cpp" diff --git a/src/Mod/Part/App/GeometrySurfacePyImp.cpp b/src/Mod/Part/App/GeometrySurfacePyImp.cpp index 7f7dafa72d..78ee7edf12 100644 --- a/src/Mod/Part/App/GeometrySurfacePyImp.cpp +++ b/src/Mod/Part/App/GeometrySurfacePyImp.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -40,7 +38,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/HLRBRep/HLRBRep_AlgoPyImp.cpp b/src/Mod/Part/App/HLRBRep/HLRBRep_AlgoPyImp.cpp index 1638ae798f..099dd4d57a 100644 --- a/src/Mod/Part/App/HLRBRep/HLRBRep_AlgoPyImp.cpp +++ b/src/Mod/Part/App/HLRBRep/HLRBRep_AlgoPyImp.cpp @@ -20,8 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include @@ -29,7 +29,6 @@ # include # include -#endif #include #include diff --git a/src/Mod/Part/App/HLRBRep/HLRBRep_PolyAlgoPyImp.cpp b/src/Mod/Part/App/HLRBRep/HLRBRep_PolyAlgoPyImp.cpp index 7bf7609b6a..8a34abc6bf 100644 --- a/src/Mod/Part/App/HLRBRep/HLRBRep_PolyAlgoPyImp.cpp +++ b/src/Mod/Part/App/HLRBRep/HLRBRep_PolyAlgoPyImp.cpp @@ -20,8 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include @@ -30,7 +30,6 @@ # include # include -#endif #include #include diff --git a/src/Mod/Part/App/HLRBRep/HLRToShapePyImp.cpp b/src/Mod/Part/App/HLRBRep/HLRToShapePyImp.cpp index e18dabf898..36d5c156cf 100644 --- a/src/Mod/Part/App/HLRBRep/HLRToShapePyImp.cpp +++ b/src/Mod/Part/App/HLRBRep/HLRToShapePyImp.cpp @@ -20,7 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include #include diff --git a/src/Mod/Part/App/HLRBRep/PolyHLRToShapePyImp.cpp b/src/Mod/Part/App/HLRBRep/PolyHLRToShapePyImp.cpp index ba65c39537..942dae1de7 100644 --- a/src/Mod/Part/App/HLRBRep/PolyHLRToShapePyImp.cpp +++ b/src/Mod/Part/App/HLRBRep/PolyHLRToShapePyImp.cpp @@ -20,7 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include #include "HLRBRep/PolyHLRToShapePy.h" #include "HLRBRep/PolyHLRToShapePy.cpp" diff --git a/src/Mod/Part/App/HyperbolaPyImp.cpp b/src/Mod/Part/App/HyperbolaPyImp.cpp index 08982e6617..101a542ad2 100644 --- a/src/Mod/Part/App/HyperbolaPyImp.cpp +++ b/src/Mod/Part/App/HyperbolaPyImp.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/IGES/ImportExportSettings.cpp b/src/Mod/Part/App/IGES/ImportExportSettings.cpp index 35a28f4f25..8e80f9728a 100644 --- a/src/Mod/Part/App/IGES/ImportExportSettings.cpp +++ b/src/Mod/Part/App/IGES/ImportExportSettings.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include "ImportExportSettings.h" #include diff --git a/src/Mod/Part/App/IGES/ImportExportSettings.h b/src/Mod/Part/App/IGES/ImportExportSettings.h index 7d37d48daa..0d97088ba8 100644 --- a/src/Mod/Part/App/IGES/ImportExportSettings.h +++ b/src/Mod/Part/App/IGES/ImportExportSettings.h @@ -26,6 +26,7 @@ #include #include +#include namespace Part { diff --git a/src/Mod/Part/App/ImportIges.cpp b/src/Mod/Part/App/ImportIges.cpp index f7ff3744fd..938ef98106 100644 --- a/src/Mod/Part/App/ImportIges.cpp +++ b/src/Mod/Part/App/ImportIges.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -38,7 +36,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/ImportStep.cpp b/src/Mod/Part/App/ImportStep.cpp index 67b9d4a67c..c0d3b80822 100644 --- a/src/Mod/Part/App/ImportStep.cpp +++ b/src/Mod/Part/App/ImportStep.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -38,7 +36,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/Interface.cpp b/src/Mod/Part/App/Interface.cpp index 3ca7fd26e6..beec94b67f 100644 --- a/src/Mod/Part/App/Interface.cpp +++ b/src/Mod/Part/App/Interface.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include "Interface.h" diff --git a/src/Mod/Part/App/LinePyImp.cpp b/src/Mod/Part/App/LinePyImp.cpp index 2739fbe01b..b884648e7d 100644 --- a/src/Mod/Part/App/LinePyImp.cpp +++ b/src/Mod/Part/App/LinePyImp.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/LineSegmentPyImp.cpp b/src/Mod/Part/App/LineSegmentPyImp.cpp index 073b3fb7f0..323d2f8df9 100644 --- a/src/Mod/Part/App/LineSegmentPyImp.cpp +++ b/src/Mod/Part/App/LineSegmentPyImp.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/MeasureClient.cpp b/src/Mod/Part/App/MeasureClient.cpp index 970de18996..523a057e70 100644 --- a/src/Mod/Part/App/MeasureClient.cpp +++ b/src/Mod/Part/App/MeasureClient.cpp @@ -22,7 +22,6 @@ **************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/Part/App/OCAF/ImportExportSettings.cpp b/src/Mod/Part/App/OCAF/ImportExportSettings.cpp index 47f5d28c0b..c1c276741a 100644 --- a/src/Mod/Part/App/OCAF/ImportExportSettings.cpp +++ b/src/Mod/Part/App/OCAF/ImportExportSettings.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include "ImportExportSettings.h" #include diff --git a/src/Mod/Part/App/OCAF/ImportExportSettings.h b/src/Mod/Part/App/OCAF/ImportExportSettings.h index a3bd5b641d..0230697ece 100644 --- a/src/Mod/Part/App/OCAF/ImportExportSettings.h +++ b/src/Mod/Part/App/OCAF/ImportExportSettings.h @@ -29,6 +29,8 @@ #include #include +#include + namespace Part { diff --git a/src/Mod/Part/App/OffsetCurvePyImp.cpp b/src/Mod/Part/App/OffsetCurvePyImp.cpp index e5ec19118c..109ec08369 100644 --- a/src/Mod/Part/App/OffsetCurvePyImp.cpp +++ b/src/Mod/Part/App/OffsetCurvePyImp.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/Part/App/OffsetSurfacePyImp.cpp b/src/Mod/Part/App/OffsetSurfacePyImp.cpp index f5107d6c43..4a1e8d853d 100644 --- a/src/Mod/Part/App/OffsetSurfacePyImp.cpp +++ b/src/Mod/Part/App/OffsetSurfacePyImp.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include "OCCError.h" #include "OffsetSurfacePy.h" diff --git a/src/Mod/Part/App/ParabolaPyImp.cpp b/src/Mod/Part/App/ParabolaPyImp.cpp index c1be99f244..f7ac6da334 100644 --- a/src/Mod/Part/App/ParabolaPyImp.cpp +++ b/src/Mod/Part/App/ParabolaPyImp.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/Part2DObject.cpp b/src/Mod/Part/App/Part2DObject.cpp index dd818c4227..38c70dc718 100644 --- a/src/Mod/Part/App/Part2DObject.cpp +++ b/src/Mod/Part/App/Part2DObject.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -37,7 +35,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/Part2DObject.h b/src/Mod/Part/App/Part2DObject.h index a22fd4a376..348fe898ea 100644 --- a/src/Mod/Part/App/Part2DObject.h +++ b/src/Mod/Part/App/Part2DObject.h @@ -26,6 +26,8 @@ #include #include +#include + #include "AttachExtension.h" diff --git a/src/Mod/Part/App/Part2DObjectPyImp.cpp b/src/Mod/Part/App/Part2DObjectPyImp.cpp index 8df1266629..d0cee3abb6 100644 --- a/src/Mod/Part/App/Part2DObjectPyImp.cpp +++ b/src/Mod/Part/App/Part2DObjectPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "Part2DObject.h" #include "OCCError.h" diff --git a/src/Mod/Part/App/PartFeature.cpp b/src/Mod/Part/App/PartFeature.cpp index 67f9fdb6d0..583f37c297 100644 --- a/src/Mod/Part/App/PartFeature.cpp +++ b/src/Mod/Part/App/PartFeature.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -54,7 +52,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/PartFeature.h b/src/Mod/Part/App/PartFeature.h index 8389417821..999a9e969a 100644 --- a/src/Mod/Part/App/PartFeature.h +++ b/src/Mod/Part/App/PartFeature.h @@ -31,6 +31,8 @@ #include +#include + #include "PropertyTopoShape.h" diff --git a/src/Mod/Part/App/PartFeaturePyImp.cpp b/src/Mod/Part/App/PartFeaturePyImp.cpp index 27a12a33b1..ad58a5c3d3 100644 --- a/src/Mod/Part/App/PartFeaturePyImp.cpp +++ b/src/Mod/Part/App/PartFeaturePyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/Part/App/PartFeatureReference.cpp b/src/Mod/Part/App/PartFeatureReference.cpp index 653c770528..2183bdae39 100644 --- a/src/Mod/Part/App/PartFeatureReference.cpp +++ b/src/Mod/Part/App/PartFeatureReference.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/PartFeatureReference.h b/src/Mod/Part/App/PartFeatureReference.h index 4ed2035e12..ca82327f56 100644 --- a/src/Mod/Part/App/PartFeatureReference.h +++ b/src/Mod/Part/App/PartFeatureReference.h @@ -25,6 +25,8 @@ #include +#include + #include "PropertyTopoShape.h" diff --git a/src/Mod/Part/App/PartFeatures.cpp b/src/Mod/Part/App/PartFeatures.cpp index f241dfacd7..1ffaa8ed7f 100644 --- a/src/Mod/Part/App/PartFeatures.cpp +++ b/src/Mod/Part/App/PartFeatures.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -41,7 +39,7 @@ #include #include #include -#endif + #include diff --git a/src/Mod/Part/App/PartFeatures.h b/src/Mod/Part/App/PartFeatures.h index f0b408200c..cd0d044800 100644 --- a/src/Mod/Part/App/PartFeatures.h +++ b/src/Mod/Part/App/PartFeatures.h @@ -26,6 +26,8 @@ #include #include +#include + #include "PartFeature.h" diff --git a/src/Mod/Part/App/PartPyCXX.cpp b/src/Mod/Part/App/PartPyCXX.cpp index 656fe6d4b0..0421480baa 100644 --- a/src/Mod/Part/App/PartPyCXX.cpp +++ b/src/Mod/Part/App/PartPyCXX.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "PartPyCXX.h" diff --git a/src/Mod/Part/App/PartPyCXX.h b/src/Mod/Part/App/PartPyCXX.h index 56ecdda577..93cac3cc2c 100644 --- a/src/Mod/Part/App/PartPyCXX.h +++ b/src/Mod/Part/App/PartPyCXX.h @@ -25,6 +25,7 @@ #include +#include #include diff --git a/src/Mod/Part/App/PlanePyImp.cpp b/src/Mod/Part/App/PlanePyImp.cpp index 22a3375579..99d4224a02 100644 --- a/src/Mod/Part/App/PlanePyImp.cpp +++ b/src/Mod/Part/App/PlanePyImp.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -29,7 +27,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/PlateSurfacePyImp.cpp b/src/Mod/Part/App/PlateSurfacePyImp.cpp index 9fe7e36ca2..655efe3ee8 100644 --- a/src/Mod/Part/App/PlateSurfacePyImp.cpp +++ b/src/Mod/Part/App/PlateSurfacePyImp.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/PointPyImp.cpp b/src/Mod/Part/App/PointPyImp.cpp index 45bb6859c5..c8ad3147af 100644 --- a/src/Mod/Part/App/PointPyImp.cpp +++ b/src/Mod/Part/App/PointPyImp.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include diff --git a/src/Mod/Part/App/PreCompiled.cpp b/src/Mod/Part/App/PreCompiled.cpp deleted file mode 100644 index 7b200a1bf2..0000000000 --- a/src/Mod/Part/App/PreCompiled.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2002 Jürgen Riegel * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" diff --git a/src/Mod/Part/App/PreCompiled.h b/src/Mod/Part/App/PreCompiled.h index 2328645fc5..f316e0fc4a 100644 --- a/src/Mod/Part/App/PreCompiled.h +++ b/src/Mod/Part/App/PreCompiled.h @@ -27,8 +27,6 @@ #include -#ifdef _PreComp_ - // standard #include #include @@ -66,9 +64,8 @@ // OpenCasCade #include "OpenCascadeAll.h" -#elif defined(FC_OS_WIN32) +#if defined(FC_OS_WIN32) #include -#include #endif #ifndef _Standard_Version_HeaderFile diff --git a/src/Mod/Part/App/PreviewExtension.cpp b/src/Mod/Part/App/PreviewExtension.cpp index a3be90aa73..2f50dda37e 100644 --- a/src/Mod/Part/App/PreviewExtension.cpp +++ b/src/Mod/Part/App/PreviewExtension.cpp @@ -21,8 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - #include "PreviewExtension.h" #include diff --git a/src/Mod/Part/App/PreviewExtension.h b/src/Mod/Part/App/PreviewExtension.h index 5498e80fb9..98cba5581a 100644 --- a/src/Mod/Part/App/PreviewExtension.h +++ b/src/Mod/Part/App/PreviewExtension.h @@ -30,6 +30,8 @@ #include #include +#include + namespace Part { diff --git a/src/Mod/Part/App/PrimitiveFeature.cpp b/src/Mod/Part/App/PrimitiveFeature.cpp index 02d13f8825..c73dff61fb 100644 --- a/src/Mod/Part/App/PrimitiveFeature.cpp +++ b/src/Mod/Part/App/PrimitiveFeature.cpp @@ -20,9 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include + # include # include # include @@ -43,7 +42,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/Part/App/PrimitiveFeature.h b/src/Mod/Part/App/PrimitiveFeature.h index 49dd4db804..5fc3794f46 100644 --- a/src/Mod/Part/App/PrimitiveFeature.h +++ b/src/Mod/Part/App/PrimitiveFeature.h @@ -23,6 +23,8 @@ #ifndef PART_PRIMITIVEFEATURE_H #define PART_PRIMITIVEFEATURE_H +#include + #include "AttachExtension.h" #include "PrismExtension.h" diff --git a/src/Mod/Part/App/PrismExtension.cpp b/src/Mod/Part/App/PrismExtension.cpp index 29b06446eb..df57c2a01c 100644 --- a/src/Mod/Part/App/PrismExtension.cpp +++ b/src/Mod/Part/App/PrismExtension.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include diff --git a/src/Mod/Part/App/PropertyGeometryList.cpp b/src/Mod/Part/App/PropertyGeometryList.cpp index 0b473ea062..5fbb52fcb3 100644 --- a/src/Mod/Part/App/PropertyGeometryList.cpp +++ b/src/Mod/Part/App/PropertyGeometryList.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Part/App/PropertyGeometryList.h b/src/Mod/Part/App/PropertyGeometryList.h index c9b6498232..561e5b36ad 100644 --- a/src/Mod/Part/App/PropertyGeometryList.h +++ b/src/Mod/Part/App/PropertyGeometryList.h @@ -27,6 +27,8 @@ #include +#include + #include "Geometry.h" diff --git a/src/Mod/Part/App/PropertyTopoShape.cpp b/src/Mod/Part/App/PropertyTopoShape.cpp index 8289e0bd7c..c72a18a6f7 100644 --- a/src/Mod/Part/App/PropertyTopoShape.cpp +++ b/src/Mod/Part/App/PropertyTopoShape.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -33,7 +31,6 @@ # include # include # include -#endif // _PreComp_ #include #include diff --git a/src/Mod/Part/App/PropertyTopoShape.h b/src/Mod/Part/App/PropertyTopoShape.h index 87b038de5a..4fc16a61f4 100644 --- a/src/Mod/Part/App/PropertyTopoShape.h +++ b/src/Mod/Part/App/PropertyTopoShape.h @@ -28,6 +28,8 @@ #include +#include + #include "TopoShape.h" #include diff --git a/src/Mod/Part/App/PropertyTopoShapeList.cpp b/src/Mod/Part/App/PropertyTopoShapeList.cpp index fa0f240533..ead6acb384 100644 --- a/src/Mod/Part/App/PropertyTopoShapeList.cpp +++ b/src/Mod/Part/App/PropertyTopoShapeList.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/Part/App/RectangularTrimmedSurfacePyImp.cpp b/src/Mod/Part/App/RectangularTrimmedSurfacePyImp.cpp index 0a6baedb05..200f821dd6 100644 --- a/src/Mod/Part/App/RectangularTrimmedSurfacePyImp.cpp +++ b/src/Mod/Part/App/RectangularTrimmedSurfacePyImp.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include "OCCError.h" diff --git a/src/Mod/Part/App/STEP/ImportExportSettings.cpp b/src/Mod/Part/App/STEP/ImportExportSettings.cpp index 4b97f7b04d..0b95416f93 100644 --- a/src/Mod/Part/App/STEP/ImportExportSettings.cpp +++ b/src/Mod/Part/App/STEP/ImportExportSettings.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include "ImportExportSettings.h" #include diff --git a/src/Mod/Part/App/STEP/ImportExportSettings.h b/src/Mod/Part/App/STEP/ImportExportSettings.h index 4218cf1cff..8735952bb1 100644 --- a/src/Mod/Part/App/STEP/ImportExportSettings.h +++ b/src/Mod/Part/App/STEP/ImportExportSettings.h @@ -26,6 +26,7 @@ #include #include +#include namespace Part { diff --git a/src/Mod/Part/App/Services.cpp b/src/Mod/Part/App/Services.cpp index 9cc75b24d2..ab3826c5ec 100644 --- a/src/Mod/Part/App/Services.cpp +++ b/src/Mod/Part/App/Services.cpp @@ -21,8 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - #include #include "Services.h" diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_EdgeConnectPyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_EdgeConnectPyImp.cpp index cb14b3f555..71f68f593b 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_EdgeConnectPyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_EdgeConnectPyImp.cpp @@ -20,10 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include -#endif + #include "ShapeFix/ShapeFix_EdgeConnectPy.h" #include "ShapeFix/ShapeFix_EdgeConnectPy.cpp" diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_EdgePyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_EdgePyImp.cpp index 01a460c3d1..8b2ca49dc5 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_EdgePyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_EdgePyImp.cpp @@ -20,10 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include -#endif + #include diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_FaceConnectPyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_FaceConnectPyImp.cpp index cc0e334a05..6b29d3dabb 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_FaceConnectPyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_FaceConnectPyImp.cpp @@ -20,11 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include -#endif + #include "ShapeFix/ShapeFix_FaceConnectPy.h" #include "ShapeFix/ShapeFix_FaceConnectPy.cpp" diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_FacePyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_FacePyImp.cpp index f7bd455fda..acb936e82e 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_FacePyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_FacePyImp.cpp @@ -20,10 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include -#endif + #include "ShapeFix/ShapeFix_FacePy.h" #include "ShapeFix/ShapeFix_FacePy.cpp" diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_FixSmallFacePyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_FixSmallFacePyImp.cpp index 1b6ecf9541..890ade47b7 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_FixSmallFacePyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_FixSmallFacePyImp.cpp @@ -20,11 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include -#endif + #include "ShapeFix/ShapeFix_FixSmallFacePy.h" #include "ShapeFix/ShapeFix_FixSmallFacePy.cpp" diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_FixSmallSolidPyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_FixSmallSolidPyImp.cpp index 9b9e10b965..cb60f35f83 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_FixSmallSolidPyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_FixSmallSolidPyImp.cpp @@ -20,10 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include -#endif + #include "ShapeFix/ShapeFix_FixSmallSolidPy.h" #include "ShapeFix/ShapeFix_FixSmallSolidPy.cpp" diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_FreeBoundsPyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_FreeBoundsPyImp.cpp index 63bbc279dd..e3d081289f 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_FreeBoundsPyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_FreeBoundsPyImp.cpp @@ -20,10 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include -#endif + #include "ShapeFix/ShapeFix_FreeBoundsPy.h" #include "ShapeFix/ShapeFix_FreeBoundsPy.cpp" diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_RootPyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_RootPyImp.cpp index 4314c41c59..5ca0d5df41 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_RootPyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_RootPyImp.cpp @@ -20,10 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include -#endif + #include "ShapeFix/ShapeFix_RootPy.h" #include "ShapeFix/ShapeFix_RootPy.cpp" diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_ShapePyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_ShapePyImp.cpp index 3ff8999235..a1619f2cff 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_ShapePyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_ShapePyImp.cpp @@ -20,7 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include #include "ShapeFix/ShapeFix_ShapePy.h" #include "ShapeFix/ShapeFix_ShapePy.cpp" diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_ShapeTolerancePyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_ShapeTolerancePyImp.cpp index 11e2e0545a..35edfefe72 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_ShapeTolerancePyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_ShapeTolerancePyImp.cpp @@ -20,10 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include -#endif + #include "ShapeFix/ShapeFix_ShapeTolerancePy.h" #include "ShapeFix/ShapeFix_ShapeTolerancePy.cpp" diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_ShellPyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_ShellPyImp.cpp index 13d40b6aee..efab4fcf66 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_ShellPyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_ShellPyImp.cpp @@ -20,10 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include -#endif + #include "ShapeFix/ShapeFix_ShellPy.h" #include "ShapeFix/ShapeFix_ShellPy.cpp" diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_SolidPyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_SolidPyImp.cpp index 9b959e5c00..dcdfc0a0f7 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_SolidPyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_SolidPyImp.cpp @@ -20,13 +20,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include # include # include -#endif #include "ShapeFix/ShapeFix_SolidPy.h" #include "ShapeFix/ShapeFix_SolidPy.cpp" diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_SplitCommonVertexPyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_SplitCommonVertexPyImp.cpp index ab63ad0209..da2f255639 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_SplitCommonVertexPyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_SplitCommonVertexPyImp.cpp @@ -20,8 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -# +#include + #include "ShapeFix/ShapeFix_SplitCommonVertexPy.h" #include "ShapeFix/ShapeFix_SplitCommonVertexPy.cpp" #include "TopoShapePy.h" diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_SplitToolPyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_SplitToolPyImp.cpp index ccfa69d338..7baa7c5a60 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_SplitToolPyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_SplitToolPyImp.cpp @@ -20,11 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include -#endif + #include "ShapeFix/ShapeFix_SplitToolPy.h" #include "ShapeFix/ShapeFix_SplitToolPy.cpp" diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_WirePyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_WirePyImp.cpp index 1bc9a36ace..52f4793de2 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_WirePyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_WirePyImp.cpp @@ -20,10 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include -#endif + #include diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_WireVertexPyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_WireVertexPyImp.cpp index 8ae6665f61..cfbc88e4bc 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_WireVertexPyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_WireVertexPyImp.cpp @@ -20,10 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include -#endif + #include "ShapeFix/ShapeFix_WireVertexPy.h" #include "ShapeFix/ShapeFix_WireVertexPy.cpp" diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_WireframePyImp.cpp b/src/Mod/Part/App/ShapeFix/ShapeFix_WireframePyImp.cpp index 7142265b8e..087e8a64bf 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_WireframePyImp.cpp +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_WireframePyImp.cpp @@ -20,7 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include #include "ShapeFix/ShapeFix_WireframePy.h" #include "ShapeFix/ShapeFix_WireframePy.cpp" diff --git a/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp b/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp index e58f3a2072..d4f5fadbd3 100644 --- a/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp +++ b/src/Mod/Part/App/ShapeUpgrade/UnifySameDomainPyImp.cpp @@ -20,14 +20,13 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ +#include + # include # include // Needed for OCCT 7.5.2 #include -#endif #include diff --git a/src/Mod/Part/App/SpherePyImp.cpp b/src/Mod/Part/App/SpherePyImp.cpp index cbdee36cc1..86d0a12b59 100644 --- a/src/Mod/Part/App/SpherePyImp.cpp +++ b/src/Mod/Part/App/SpherePyImp.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/SurfaceOfExtrusionPyImp.cpp b/src/Mod/Part/App/SurfaceOfExtrusionPyImp.cpp index 651bf96b00..d1f7c966b1 100644 --- a/src/Mod/Part/App/SurfaceOfExtrusionPyImp.cpp +++ b/src/Mod/Part/App/SurfaceOfExtrusionPyImp.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/SurfaceOfRevolutionPyImp.cpp b/src/Mod/Part/App/SurfaceOfRevolutionPyImp.cpp index f9eae0a862..066c2e5cd2 100644 --- a/src/Mod/Part/App/SurfaceOfRevolutionPyImp.cpp +++ b/src/Mod/Part/App/SurfaceOfRevolutionPyImp.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/Part/App/Tools.cpp b/src/Mod/Part/App/Tools.cpp index bf1f9197c6..7f2ed81053 100644 --- a/src/Mod/Part/App/Tools.cpp +++ b/src/Mod/Part/App/Tools.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -65,7 +63,6 @@ # include # include # endif -#endif #include #include diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index 6e4fce8e24..06991839be 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -20,9 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include -#ifndef _PreComp_ # include # include # include @@ -158,7 +157,6 @@ # include # include -#endif // _PreComp_ #include #include diff --git a/src/Mod/Part/App/TopoShapeCache.cpp b/src/Mod/Part/App/TopoShapeCache.cpp index 5db0698191..0def189182 100644 --- a/src/Mod/Part/App/TopoShapeCache.cpp +++ b/src/Mod/Part/App/TopoShapeCache.cpp @@ -22,7 +22,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "TopoShapeCache.h" using namespace Part; diff --git a/src/Mod/Part/App/TopoShapeCache.h b/src/Mod/Part/App/TopoShapeCache.h index 4113c2eabd..df64c576ac 100644 --- a/src/Mod/Part/App/TopoShapeCache.h +++ b/src/Mod/Part/App/TopoShapeCache.h @@ -25,10 +25,6 @@ #ifndef FREECAD_TOPOSHAPECACHE_H #define FREECAD_TOPOSHAPECACHE_H - -#include "PreCompiled.h" - -#ifndef _PreComp_ #include #include #include @@ -38,10 +34,11 @@ #include #include #include -#endif #include +#include + #include "TopoShape.h" namespace Part diff --git a/src/Mod/Part/App/TopoShapeCompSolidPyImp.cpp b/src/Mod/Part/App/TopoShapeCompSolidPyImp.cpp index 2ca1ba083d..40e111ee31 100644 --- a/src/Mod/Part/App/TopoShapeCompSolidPyImp.cpp +++ b/src/Mod/Part/App/TopoShapeCompSolidPyImp.cpp @@ -20,14 +20,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include "OCCError.h" #include "PartPyCXX.h" diff --git a/src/Mod/Part/App/TopoShapeCompoundPyImp.cpp b/src/Mod/Part/App/TopoShapeCompoundPyImp.cpp index 19ea91b965..47ac9e6511 100644 --- a/src/Mod/Part/App/TopoShapeCompoundPyImp.cpp +++ b/src/Mod/Part/App/TopoShapeCompoundPyImp.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "TopoShape.h" -#ifndef _PreComp_ # include # include # include @@ -33,7 +31,7 @@ # include # include # include -#endif + #include "OCCError.h" #include diff --git a/src/Mod/Part/App/TopoShapeEdgePyImp.cpp b/src/Mod/Part/App/TopoShapeEdgePyImp.cpp index 7c104a080f..4407f2bc9d 100644 --- a/src/Mod/Part/App/TopoShapeEdgePyImp.cpp +++ b/src/Mod/Part/App/TopoShapeEdgePyImp.cpp @@ -20,9 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include + # include # include # include @@ -63,7 +62,6 @@ # include # include # include -#endif // _PreComp_ #include #include diff --git a/src/Mod/Part/App/TopoShapeExpansion.cpp b/src/Mod/Part/App/TopoShapeExpansion.cpp index 405b64a97b..0b38d2be82 100644 --- a/src/Mod/Part/App/TopoShapeExpansion.cpp +++ b/src/Mod/Part/App/TopoShapeExpansion.cpp @@ -22,12 +22,13 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include +#ifndef _Standard_Version_HeaderFile +# include +#endif + #include #include #if OCC_VERSION_HEX < 0x070600 @@ -82,10 +83,10 @@ #include -#endif - #include +#include + #include "modelRefine.h" #include "CrossSection.h" #include "TopoShape.h" diff --git a/src/Mod/Part/App/TopoShapeFacePyImp.cpp b/src/Mod/Part/App/TopoShapeFacePyImp.cpp index 66e88d1635..1995112536 100644 --- a/src/Mod/Part/App/TopoShapeFacePyImp.cpp +++ b/src/Mod/Part/App/TopoShapeFacePyImp.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -62,7 +60,7 @@ # include # include # include -#endif // _PreComp + #include #include diff --git a/src/Mod/Part/App/TopoShapeMapper.cpp b/src/Mod/Part/App/TopoShapeMapper.cpp index b9b2ae4950..c09aae9848 100644 --- a/src/Mod/Part/App/TopoShapeMapper.cpp +++ b/src/Mod/Part/App/TopoShapeMapper.cpp @@ -21,12 +21,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include "TopoShapeMapper.h" #include "Geometry.h" diff --git a/src/Mod/Part/App/TopoShapeMapper.h b/src/Mod/Part/App/TopoShapeMapper.h index 4fb67c2865..8ced574aa2 100644 --- a/src/Mod/Part/App/TopoShapeMapper.h +++ b/src/Mod/Part/App/TopoShapeMapper.h @@ -31,6 +31,8 @@ #include #include "TopoShape.h" +#include + class BRepBuilderAPI_MakeShape; class BRepTools_History; class BRepTools_ReShape; diff --git a/src/Mod/Part/App/TopoShapeOpCode.h b/src/Mod/Part/App/TopoShapeOpCode.h index 00f5b9686b..d85532938c 100644 --- a/src/Mod/Part/App/TopoShapeOpCode.h +++ b/src/Mod/Part/App/TopoShapeOpCode.h @@ -23,6 +23,8 @@ #ifndef PART_TOPOSHAPE_OPCODE_H #define PART_TOPOSHAPE_OPCODE_H +#include + /** Definition of commonly used TopoShape operational code * * The operational code (op code) is encoded into the mapped element name to diff --git a/src/Mod/Part/App/TopoShapePyImp.cpp b/src/Mod/Part/App/TopoShapePyImp.cpp index 5f567ae3da..4536504820 100644 --- a/src/Mod/Part/App/TopoShapePyImp.cpp +++ b/src/Mod/Part/App/TopoShapePyImp.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -65,7 +63,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/Part/App/TopoShapeShellPyImp.cpp b/src/Mod/Part/App/TopoShapeShellPyImp.cpp index dba6e01b27..74c7cd4a33 100644 --- a/src/Mod/Part/App/TopoShapeShellPyImp.cpp +++ b/src/Mod/Part/App/TopoShapeShellPyImp.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -32,7 +30,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/TopoShapeSolidPyImp.cpp b/src/Mod/Part/App/TopoShapeSolidPyImp.cpp index 4035ed3878..aa16669e72 100644 --- a/src/Mod/Part/App/TopoShapeSolidPyImp.cpp +++ b/src/Mod/Part/App/TopoShapeSolidPyImp.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -41,7 +39,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/TopoShapeVertexPyImp.cpp b/src/Mod/Part/App/TopoShapeVertexPyImp.cpp index ede035af23..636e0b895d 100644 --- a/src/Mod/Part/App/TopoShapeVertexPyImp.cpp +++ b/src/Mod/Part/App/TopoShapeVertexPyImp.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -31,7 +29,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/TopoShapeWirePyImp.cpp b/src/Mod/Part/App/TopoShapeWirePyImp.cpp index e3ba6c3234..2beacf3dee 100644 --- a/src/Mod/Part/App/TopoShapeWirePyImp.cpp +++ b/src/Mod/Part/App/TopoShapeWirePyImp.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -42,7 +40,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/ToroidPyImp.cpp b/src/Mod/Part/App/ToroidPyImp.cpp index cdb480059d..46b775ae46 100644 --- a/src/Mod/Part/App/ToroidPyImp.cpp +++ b/src/Mod/Part/App/ToroidPyImp.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/Part/App/TrimmedCurvePyImp.cpp b/src/Mod/Part/App/TrimmedCurvePyImp.cpp index b4eb7fa7cb..e6d4a0423c 100644 --- a/src/Mod/Part/App/TrimmedCurvePyImp.cpp +++ b/src/Mod/Part/App/TrimmedCurvePyImp.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include "OCCError.h" #include "TrimmedCurvePy.h" diff --git a/src/Mod/Part/App/VectorAdapter.cpp b/src/Mod/Part/App/VectorAdapter.cpp index 7801edac71..a21fda5a73 100644 --- a/src/Mod/Part/App/VectorAdapter.cpp +++ b/src/Mod/Part/App/VectorAdapter.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Part/App/WireJoiner.cpp b/src/Mod/Part/App/WireJoiner.cpp index e386836214..dae61355b1 100644 --- a/src/Mod/Part/App/WireJoiner.cpp +++ b/src/Mod/Part/App/WireJoiner.cpp @@ -20,13 +20,12 @@ * * ****************************************************************************/ -#include "PreCompiled.h" +#include + #include #include #include -#ifndef _PreComp_ -# include # include # include # include @@ -52,7 +51,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/Part/App/WireJoiner.h b/src/Mod/Part/App/WireJoiner.h index 23e23623ee..3a6a28e9c3 100644 --- a/src/Mod/Part/App/WireJoiner.h +++ b/src/Mod/Part/App/WireJoiner.h @@ -28,6 +28,8 @@ #include #include "TopoShape.h" +#include + namespace Part{ class PartExport WireJoiner: public BRepBuilderAPI_MakeShape { diff --git a/src/Mod/Part/App/edgecluster.cpp b/src/Mod/Part/App/edgecluster.cpp index cb1f2882b0..29d0f1f536 100644 --- a/src/Mod/Part/App/edgecluster.cpp +++ b/src/Mod/Part/App/edgecluster.cpp @@ -20,14 +20,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include -#endif + #include "edgecluster.h" diff --git a/src/Mod/Part/App/modelRefine.cpp b/src/Mod/Part/App/modelRefine.cpp index 0a71cef4c5..010f0e04a9 100644 --- a/src/Mod/Part/App/modelRefine.cpp +++ b/src/Mod/Part/App/modelRefine.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -66,7 +64,6 @@ # include # include # include -#endif // _PreComp_ #include diff --git a/src/Mod/Part/Gui/AppPartGui.cpp b/src/Mod/Part/Gui/AppPartGui.cpp index c83446945a..d6105a6d73 100644 --- a/src/Mod/Part/Gui/AppPartGui.cpp +++ b/src/Mod/Part/Gui/AppPartGui.cpp @@ -21,11 +21,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ -#endif - #include #include #include diff --git a/src/Mod/Part/Gui/AttacherTexts.cpp b/src/Mod/Part/Gui/AttacherTexts.cpp index 5ad0c1a3eb..1e99940dc9 100644 --- a/src/Mod/Part/Gui/AttacherTexts.cpp +++ b/src/Mod/Part/Gui/AttacherTexts.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include diff --git a/src/Mod/Part/Gui/AttacherTexts.h b/src/Mod/Part/Gui/AttacherTexts.h index 6e0d96354c..27aa61e126 100644 --- a/src/Mod/Part/Gui/AttacherTexts.h +++ b/src/Mod/Part/Gui/AttacherTexts.h @@ -33,6 +33,7 @@ #include #include +#include namespace AttacherGui { diff --git a/src/Mod/Part/Gui/BoxSelection.cpp b/src/Mod/Part/Gui/BoxSelection.cpp index f2aa123f02..1565170b75 100644 --- a/src/Mod/Part/Gui/BoxSelection.cpp +++ b/src/Mod/Part/Gui/BoxSelection.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -32,7 +30,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/CMakeLists.txt b/src/Mod/Part/Gui/CMakeLists.txt index 46eb0738cb..ef165ac75a 100644 --- a/src/Mod/Part/Gui/CMakeLists.txt +++ b/src/Mod/Part/Gui/CMakeLists.txt @@ -139,7 +139,6 @@ SET(PartGui_SRCS PatternParametersWidget.h PatternParametersWidget.ui Resources/Part.qrc - PreCompiled.cpp PreCompiled.h PropertyEnumAttacherItem.cpp PropertyEnumAttacherItem.h @@ -251,18 +250,18 @@ SET(PartGui_SRCS TaskAttacher.cpp ) -if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${PartGui_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(PartGui PreCompiled.h PreCompiled.cpp PCH_SRCS) -endif(FREECAD_USE_PCH) - SET(PartGuiIcon_SVG Resources/icons/PartWorkbench.svg ) add_library(PartGui SHARED ${PartGui_SRCS} ${PartGuiIcon_SVG}) +if(FREECAD_USE_PCH) + target_precompile_headers(PartGui PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_include_directories( PartGui PRIVATE diff --git a/src/Mod/Part/Gui/Command.cpp b/src/Mod/Part/Gui/Command.cpp index 2c530fc90b..91c4fb1c13 100644 --- a/src/Mod/Part/Gui/Command.cpp +++ b/src/Mod/Part/Gui/Command.cpp @@ -21,15 +21,13 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/CommandFilter.cpp b/src/Mod/Part/Gui/CommandFilter.cpp index 4497727b87..ef07c09aac 100644 --- a/src/Mod/Part/Gui/CommandFilter.cpp +++ b/src/Mod/Part/Gui/CommandFilter.cpp @@ -21,11 +21,9 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/Part/Gui/CommandParametric.cpp b/src/Mod/Part/Gui/CommandParametric.cpp index 4eab77b164..e9a305f542 100644 --- a/src/Mod/Part/Gui/CommandParametric.cpp +++ b/src/Mod/Part/Gui/CommandParametric.cpp @@ -21,11 +21,9 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/CommandSimple.cpp b/src/Mod/Part/Gui/CommandSimple.cpp index 3138a2cc45..032168c709 100644 --- a/src/Mod/Part/Gui/CommandSimple.cpp +++ b/src/Mod/Part/Gui/CommandSimple.cpp @@ -21,10 +21,8 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/CrossSections.cpp b/src/Mod/Part/Gui/CrossSections.cpp index 296a3f1d45..04c82174f2 100644 --- a/src/Mod/Part/Gui/CrossSections.cpp +++ b/src/Mod/Part/Gui/CrossSections.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ # include + # include # include @@ -36,7 +34,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/Part/Gui/DlgBooleanOperation.cpp b/src/Mod/Part/Gui/DlgBooleanOperation.cpp index fa04a31f70..292cb8f76e 100644 --- a/src/Mod/Part/Gui/DlgBooleanOperation.cpp +++ b/src/Mod/Part/Gui/DlgBooleanOperation.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/DlgExportStep.cpp b/src/Mod/Part/Gui/DlgExportStep.cpp index 8f17b379ed..9692d6bf63 100644 --- a/src/Mod/Part/Gui/DlgExportStep.cpp +++ b/src/Mod/Part/Gui/DlgExportStep.cpp @@ -20,16 +20,14 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/DlgExtrusion.cpp b/src/Mod/Part/Gui/DlgExtrusion.cpp index 3cf54c0c72..dc1350a810 100644 --- a/src/Mod/Part/Gui/DlgExtrusion.cpp +++ b/src/Mod/Part/Gui/DlgExtrusion.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -31,7 +29,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/DlgFilletEdges.cpp b/src/Mod/Part/Gui/DlgFilletEdges.cpp index 66d80858bf..b323693818 100644 --- a/src/Mod/Part/Gui/DlgFilletEdges.cpp +++ b/src/Mod/Part/Gui/DlgFilletEdges.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -44,7 +42,6 @@ # include # include -#endif #include #include diff --git a/src/Mod/Part/Gui/DlgImportStep.cpp b/src/Mod/Part/Gui/DlgImportStep.cpp index a7edc5ee41..153cad5ee3 100644 --- a/src/Mod/Part/Gui/DlgImportStep.cpp +++ b/src/Mod/Part/Gui/DlgImportStep.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/DlgPartBoxImp.cpp b/src/Mod/Part/Gui/DlgPartBoxImp.cpp index acf9972b63..7af7449fb8 100644 --- a/src/Mod/Part/Gui/DlgPartBoxImp.cpp +++ b/src/Mod/Part/Gui/DlgPartBoxImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "DlgPartBoxImp.h" #include "ui_DlgPartBox.h" diff --git a/src/Mod/Part/Gui/DlgPartCylinderImp.cpp b/src/Mod/Part/Gui/DlgPartCylinderImp.cpp index da3c88bf17..01ef22a52a 100644 --- a/src/Mod/Part/Gui/DlgPartCylinderImp.cpp +++ b/src/Mod/Part/Gui/DlgPartCylinderImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "DlgPartCylinderImp.h" #include "ui_DlgPartCylinder.h" diff --git a/src/Mod/Part/Gui/DlgPartImportIgesImp.cpp b/src/Mod/Part/Gui/DlgPartImportIgesImp.cpp index 355c22eb9a..ec40fa4045 100644 --- a/src/Mod/Part/Gui/DlgPartImportIgesImp.cpp +++ b/src/Mod/Part/Gui/DlgPartImportIgesImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Part/Gui/DlgPartImportStepImp.cpp b/src/Mod/Part/Gui/DlgPartImportStepImp.cpp index 8324949dbd..541a5fa16b 100644 --- a/src/Mod/Part/Gui/DlgPartImportStepImp.cpp +++ b/src/Mod/Part/Gui/DlgPartImportStepImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Part/Gui/DlgPrimitives.cpp b/src/Mod/Part/Gui/DlgPrimitives.cpp index f279f81573..fa84147cc0 100644 --- a/src/Mod/Part/Gui/DlgPrimitives.cpp +++ b/src/Mod/Part/Gui/DlgPrimitives.cpp @@ -20,9 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include + #include #include #include @@ -33,7 +32,7 @@ #include #include #include -#endif + #include #include diff --git a/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp b/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp index 646a360ec5..7a96c99b18 100644 --- a/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp +++ b/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp @@ -20,9 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include + #include #include #include @@ -42,7 +41,7 @@ #include #include #include -#endif + #include #include diff --git a/src/Mod/Part/Gui/DlgRevolution.cpp b/src/Mod/Part/Gui/DlgRevolution.cpp index f20c6ca1c9..59f14e9456 100644 --- a/src/Mod/Part/Gui/DlgRevolution.cpp +++ b/src/Mod/Part/Gui/DlgRevolution.cpp @@ -20,19 +20,17 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -#endif +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/src/Mod/Part/Gui/DlgScale.cpp b/src/Mod/Part/Gui/DlgScale.cpp index f114f42bfb..7d64ed7ecb 100644 --- a/src/Mod/Part/Gui/DlgScale.cpp +++ b/src/Mod/Part/Gui/DlgScale.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -33,7 +31,7 @@ # include #include #include -#endif + #include #include diff --git a/src/Mod/Part/Gui/DlgSettings3DViewPartImp.cpp b/src/Mod/Part/Gui/DlgSettings3DViewPartImp.cpp index 6055e3e3d6..d8e48aaecd 100644 --- a/src/Mod/Part/Gui/DlgSettings3DViewPartImp.cpp +++ b/src/Mod/Part/Gui/DlgSettings3DViewPartImp.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/DlgSettingsGeneral.cpp b/src/Mod/Part/Gui/DlgSettingsGeneral.cpp index 93998159c7..9b6a19f844 100644 --- a/src/Mod/Part/Gui/DlgSettingsGeneral.cpp +++ b/src/Mod/Part/Gui/DlgSettingsGeneral.cpp @@ -20,14 +20,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/DlgSettingsObjectColor.cpp b/src/Mod/Part/Gui/DlgSettingsObjectColor.cpp index f9ce22a357..ebd401b779 100644 --- a/src/Mod/Part/Gui/DlgSettingsObjectColor.cpp +++ b/src/Mod/Part/Gui/DlgSettingsObjectColor.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "DlgSettingsObjectColor.h" #include "ui_DlgSettingsObjectColor.h" diff --git a/src/Mod/Part/Gui/Mirroring.cpp b/src/Mod/Part/Gui/Mirroring.cpp index c3d72df087..21e2b8e762 100644 --- a/src/Mod/Part/Gui/Mirroring.cpp +++ b/src/Mod/Part/Gui/Mirroring.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ # include # include @@ -42,7 +39,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/Part/Gui/PatternParametersWidget.cpp b/src/Mod/Part/Gui/PatternParametersWidget.cpp index 04c7d4ca4e..7b4a277f0c 100644 --- a/src/Mod/Part/Gui/PatternParametersWidget.cpp +++ b/src/Mod/Part/Gui/PatternParametersWidget.cpp @@ -21,16 +21,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ #include #include #include #include #include #include -#endif #include "ui_PatternParametersWidget.h" #include "PatternParametersWidget.h" diff --git a/src/Mod/Part/Gui/PreCompiled.cpp b/src/Mod/Part/Gui/PreCompiled.cpp deleted file mode 100644 index 7b200a1bf2..0000000000 --- a/src/Mod/Part/Gui/PreCompiled.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2002 Jürgen Riegel * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" diff --git a/src/Mod/Part/Gui/PreCompiled.h b/src/Mod/Part/Gui/PreCompiled.h index b49104f095..2050166d2c 100644 --- a/src/Mod/Part/Gui/PreCompiled.h +++ b/src/Mod/Part/Gui/PreCompiled.h @@ -32,7 +32,6 @@ # include #endif -#ifdef _PreComp_ // standard #include @@ -78,6 +77,5 @@ // Inventor includes OpenGL # include -#endif //_PreComp_ #endif // PARTGUI_PRECOMPILED_H diff --git a/src/Mod/Part/Gui/PropertyEnumAttacherItem.cpp b/src/Mod/Part/Gui/PropertyEnumAttacherItem.cpp index 6f98f0f62a..9b63b82d00 100644 --- a/src/Mod/Part/Gui/PropertyEnumAttacherItem.cpp +++ b/src/Mod/Part/Gui/PropertyEnumAttacherItem.cpp @@ -20,12 +20,7 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - -#ifndef _PreComp_ # include -#endif // _PreComp_ #include #include diff --git a/src/Mod/Part/Gui/PropertyEnumAttacherItem.h b/src/Mod/Part/Gui/PropertyEnumAttacherItem.h index bb90d851e1..2e6369399c 100644 --- a/src/Mod/Part/Gui/PropertyEnumAttacherItem.h +++ b/src/Mod/Part/Gui/PropertyEnumAttacherItem.h @@ -25,6 +25,9 @@ #define PART_PropertyEnumAttacherItem_H #include + +#include + #include "TaskAttacher.h" namespace PartGui diff --git a/src/Mod/Part/Gui/ReferenceHighlighter.cpp b/src/Mod/Part/Gui/ReferenceHighlighter.cpp index fd64a10a4d..e45bd746b2 100644 --- a/src/Mod/Part/Gui/ReferenceHighlighter.cpp +++ b/src/Mod/Part/Gui/ReferenceHighlighter.cpp @@ -20,13 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include -#endif #include "ReferenceHighlighter.h" diff --git a/src/Mod/Part/Gui/SectionCutting.cpp b/src/Mod/Part/Gui/SectionCutting.cpp index 8425f8bf04..8b0e384c3a 100644 --- a/src/Mod/Part/Gui/SectionCutting.cpp +++ b/src/Mod/Part/Gui/SectionCutting.cpp @@ -20,21 +20,17 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include +#include -#ifndef _PreComp_ -# include -# include - -# include -# include -# include -# include -# include -# include -# include -# include -#endif +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/src/Mod/Part/Gui/ShapeFromMesh.cpp b/src/Mod/Part/Gui/ShapeFromMesh.cpp index 14af6e82ef..a67b0e926a 100644 --- a/src/Mod/Part/Gui/ShapeFromMesh.cpp +++ b/src/Mod/Part/Gui/ShapeFromMesh.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/SoBrepEdgeSet.cpp b/src/Mod/Part/Gui/SoBrepEdgeSet.cpp index 14da9ed8e9..8274f2ce09 100644 --- a/src/Mod/Part/Gui/SoBrepEdgeSet.cpp +++ b/src/Mod/Part/Gui/SoBrepEdgeSet.cpp @@ -20,9 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include -#ifndef _PreComp_ # ifdef FC_OS_WIN32 # include # endif @@ -46,7 +45,6 @@ # include # include # include -#endif #include #include @@ -92,7 +90,7 @@ void SoBrepEdgeSet::GLRender(SoGLRenderAction *action) bool hasContextHighlight = ctx && !ctx->hl.empty(); bool hasFaceHighlight = viewProvider && viewProvider->isFaceHighlightActive(); bool hasAnyHighlight = hasContextHighlight || hasFaceHighlight; - + if (Gui::Selection().isClarifySelectionActive() && !Gui::SoDelayedAnnotationsElement::isProcessingDelayedPaths && hasAnyHighlight) { @@ -106,7 +104,7 @@ void SoBrepEdgeSet::GLRender(SoGLRenderAction *action) 200); return; } - + if(selContext2->checkGlobal(ctx)) { if(selContext2->isSelectAll()) { selContext2->sl.clear(); diff --git a/src/Mod/Part/Gui/SoBrepFaceSet.cpp b/src/Mod/Part/Gui/SoBrepFaceSet.cpp index 925296eda2..138c8747a8 100644 --- a/src/Mod/Part/Gui/SoBrepFaceSet.cpp +++ b/src/Mod/Part/Gui/SoBrepFaceSet.cpp @@ -20,7 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include #ifndef FC_OS_WIN32 # ifndef GL_GLEXT_PROTOTYPES @@ -28,7 +28,6 @@ # endif #endif -#ifndef _PreComp_ # include # include # include @@ -66,7 +65,6 @@ # endif //FC_OS_WIN32 // Should come after glext.h to avoid warnings # include -#endif #include diff --git a/src/Mod/Part/Gui/SoBrepPointSet.cpp b/src/Mod/Part/Gui/SoBrepPointSet.cpp index 8d8b8d6009..9474d8b9b4 100644 --- a/src/Mod/Part/Gui/SoBrepPointSet.cpp +++ b/src/Mod/Part/Gui/SoBrepPointSet.cpp @@ -20,9 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include -#ifndef _PreComp_ # ifdef FC_OS_WIN32 # include # endif @@ -41,7 +40,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/Part/Gui/SoFCShapeObject.cpp b/src/Mod/Part/Gui/SoFCShapeObject.cpp index 048c04e314..bd7dd5582d 100644 --- a/src/Mod/Part/Gui/SoFCShapeObject.cpp +++ b/src/Mod/Part/Gui/SoFCShapeObject.cpp @@ -20,9 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include -#ifndef _PreComp_ # ifdef FC_OS_WIN32 # include # endif @@ -40,7 +39,6 @@ # include # include # include -#endif #include "SoFCShapeObject.h" diff --git a/src/Mod/Part/Gui/SoFCShapeObject.h b/src/Mod/Part/Gui/SoFCShapeObject.h index 84589b9b8a..ab898f6aae 100644 --- a/src/Mod/Part/Gui/SoFCShapeObject.h +++ b/src/Mod/Part/Gui/SoFCShapeObject.h @@ -34,6 +34,8 @@ #include #include +#include + namespace PartGui { class PartGuiExport SoFCShape : public SoSeparator { diff --git a/src/Mod/Part/Gui/TaskAttacher.cpp b/src/Mod/Part/Gui/TaskAttacher.cpp index 0cc2c7552d..d6aac8e397 100644 --- a/src/Mod/Part/Gui/TaskAttacher.cpp +++ b/src/Mod/Part/Gui/TaskAttacher.cpp @@ -21,15 +21,13 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/TaskAttacher.h b/src/Mod/Part/Gui/TaskAttacher.h index 9d06fcf93a..69f27b46dd 100644 --- a/src/Mod/Part/Gui/TaskAttacher.h +++ b/src/Mod/Part/Gui/TaskAttacher.h @@ -34,6 +34,8 @@ #include +#include + class Ui_TaskAttacher; class QLineEdit; diff --git a/src/Mod/Part/Gui/TaskCheckGeometry.cpp b/src/Mod/Part/Gui/TaskCheckGeometry.cpp index 11ad27edef..6790f29922 100644 --- a/src/Mod/Part/Gui/TaskCheckGeometry.cpp +++ b/src/Mod/Part/Gui/TaskCheckGeometry.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -54,7 +52,6 @@ # include # include # include -#endif //_PreComp_ #include #include diff --git a/src/Mod/Part/Gui/TaskFaceAppearances.cpp b/src/Mod/Part/Gui/TaskFaceAppearances.cpp index bf0b89e467..d13114ac94 100644 --- a/src/Mod/Part/Gui/TaskFaceAppearances.cpp +++ b/src/Mod/Part/Gui/TaskFaceAppearances.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -41,7 +39,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/TaskLoft.cpp b/src/Mod/Part/Gui/TaskLoft.cpp index ed9346c751..f550c08c98 100644 --- a/src/Mod/Part/Gui/TaskLoft.cpp +++ b/src/Mod/Part/Gui/TaskLoft.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -31,7 +29,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/TaskOffset.cpp b/src/Mod/Part/Gui/TaskOffset.cpp index 13548e85b7..23eabd664f 100644 --- a/src/Mod/Part/Gui/TaskOffset.cpp +++ b/src/Mod/Part/Gui/TaskOffset.cpp @@ -20,12 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include -#ifndef _PreComp_ -# include -# include -#endif +#include #include #include diff --git a/src/Mod/Part/Gui/TaskShapeBuilder.cpp b/src/Mod/Part/Gui/TaskShapeBuilder.cpp index 756065af66..dab62cced3 100644 --- a/src/Mod/Part/Gui/TaskShapeBuilder.cpp +++ b/src/Mod/Part/Gui/TaskShapeBuilder.cpp @@ -20,16 +20,14 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/TaskSweep.cpp b/src/Mod/Part/Gui/TaskSweep.cpp index 1da8e1d3a4..793a02a1b2 100644 --- a/src/Mod/Part/Gui/TaskSweep.cpp +++ b/src/Mod/Part/Gui/TaskSweep.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -35,7 +33,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/TaskThickness.cpp b/src/Mod/Part/Gui/TaskThickness.cpp index eaf278f568..24c7c9fb9a 100644 --- a/src/Mod/Part/Gui/TaskThickness.cpp +++ b/src/Mod/Part/Gui/TaskThickness.cpp @@ -20,11 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif #include #include diff --git a/src/Mod/Part/Gui/ViewProvider.cpp b/src/Mod/Part/Gui/ViewProvider.cpp index a8c515519b..28d855c76e 100644 --- a/src/Mod/Part/Gui/ViewProvider.cpp +++ b/src/Mod/Part/Gui/ViewProvider.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Part/Gui/ViewProvider.h b/src/Mod/Part/Gui/ViewProvider.h index 14b1a72230..67bb2d5ce4 100644 --- a/src/Mod/Part/Gui/ViewProvider.h +++ b/src/Mod/Part/Gui/ViewProvider.h @@ -28,6 +28,7 @@ #include #include +#include class SoSeparator; diff --git a/src/Mod/Part/Gui/ViewProvider2DObject.cpp b/src/Mod/Part/Gui/ViewProvider2DObject.cpp index be5f1f3517..9bf0ac18a9 100644 --- a/src/Mod/Part/Gui/ViewProvider2DObject.cpp +++ b/src/Mod/Part/Gui/ViewProvider2DObject.cpp @@ -20,10 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ - # include # include @@ -35,7 +31,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/Part/Gui/ViewProvider2DObject.h b/src/Mod/Part/Gui/ViewProvider2DObject.h index 19d34b4f72..be1e8d2a43 100644 --- a/src/Mod/Part/Gui/ViewProvider2DObject.h +++ b/src/Mod/Part/Gui/ViewProvider2DObject.h @@ -28,6 +28,8 @@ #include #include +#include + class TopoDS_Shape; class TopoDS_Face; class SoSeparator; diff --git a/src/Mod/Part/Gui/ViewProviderAttachExtension.cpp b/src/Mod/Part/Gui/ViewProviderAttachExtension.cpp index f2584eff64..bfe3cde6b6 100644 --- a/src/Mod/Part/Gui/ViewProviderAttachExtension.cpp +++ b/src/Mod/Part/Gui/ViewProviderAttachExtension.cpp @@ -20,12 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ # include # include -#endif #include #include diff --git a/src/Mod/Part/Gui/ViewProviderBoolean.cpp b/src/Mod/Part/Gui/ViewProviderBoolean.cpp index 430372d1ff..11b4c0a9e3 100644 --- a/src/Mod/Part/Gui/ViewProviderBoolean.cpp +++ b/src/Mod/Part/Gui/ViewProviderBoolean.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/ViewProviderBoolean.h b/src/Mod/Part/Gui/ViewProviderBoolean.h index b5f048baf2..e4fd4cb95f 100644 --- a/src/Mod/Part/Gui/ViewProviderBoolean.h +++ b/src/Mod/Part/Gui/ViewProviderBoolean.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_ViewProviderBoolean_H #define PARTGUI_ViewProviderBoolean_H +#include + #include "ViewProvider.h" diff --git a/src/Mod/Part/Gui/ViewProviderBox.cpp b/src/Mod/Part/Gui/ViewProviderBox.cpp index 555ffbb8b1..cb671cdee3 100644 --- a/src/Mod/Part/Gui/ViewProviderBox.cpp +++ b/src/Mod/Part/Gui/ViewProviderBox.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderBox.h" diff --git a/src/Mod/Part/Gui/ViewProviderBox.h b/src/Mod/Part/Gui/ViewProviderBox.h index 39f1d1c1cd..c2d62210c7 100644 --- a/src/Mod/Part/Gui/ViewProviderBox.h +++ b/src/Mod/Part/Gui/ViewProviderBox.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERBOX_H #define PARTGUI_VIEWPROVIDERBOX_H +#include + #include "ViewProviderPrimitive.h" diff --git a/src/Mod/Part/Gui/ViewProviderCircleParametric.cpp b/src/Mod/Part/Gui/ViewProviderCircleParametric.cpp index 4802f49291..00494cd480 100644 --- a/src/Mod/Part/Gui/ViewProviderCircleParametric.cpp +++ b/src/Mod/Part/Gui/ViewProviderCircleParametric.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderCircleParametric.h" diff --git a/src/Mod/Part/Gui/ViewProviderCircleParametric.h b/src/Mod/Part/Gui/ViewProviderCircleParametric.h index 4a1c5df693..c66b592cdf 100644 --- a/src/Mod/Part/Gui/ViewProviderCircleParametric.h +++ b/src/Mod/Part/Gui/ViewProviderCircleParametric.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERCIRCLEPARAMETRIC_H #define PARTGUI_VIEWPROVIDERCIRCLEPARAMETRIC_H +#include + #include "ViewProviderPrimitive.h" diff --git a/src/Mod/Part/Gui/ViewProviderCompound.cpp b/src/Mod/Part/Gui/ViewProviderCompound.cpp index 5478546741..7f56fa21ac 100644 --- a/src/Mod/Part/Gui/ViewProviderCompound.cpp +++ b/src/Mod/Part/Gui/ViewProviderCompound.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/ViewProviderCompound.h b/src/Mod/Part/Gui/ViewProviderCompound.h index 642f8a7e63..5e1bf48a21 100644 --- a/src/Mod/Part/Gui/ViewProviderCompound.h +++ b/src/Mod/Part/Gui/ViewProviderCompound.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERCOMPOUND_H #define PARTGUI_VIEWPROVIDERCOMPOUND_H +#include + #include "ViewProvider.h" diff --git a/src/Mod/Part/Gui/ViewProviderConeParametric.cpp b/src/Mod/Part/Gui/ViewProviderConeParametric.cpp index 0289771c8e..8e1d0c34cc 100644 --- a/src/Mod/Part/Gui/ViewProviderConeParametric.cpp +++ b/src/Mod/Part/Gui/ViewProviderConeParametric.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderConeParametric.h" diff --git a/src/Mod/Part/Gui/ViewProviderConeParametric.h b/src/Mod/Part/Gui/ViewProviderConeParametric.h index aaee45992f..729de999e7 100644 --- a/src/Mod/Part/Gui/ViewProviderConeParametric.h +++ b/src/Mod/Part/Gui/ViewProviderConeParametric.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERCONEPARAMETRIC_H #define PARTGUI_VIEWPROVIDERCONEPARAMETRIC_H +#include + #include "ViewProviderPrimitive.h" diff --git a/src/Mod/Part/Gui/ViewProviderCurveNet.cpp b/src/Mod/Part/Gui/ViewProviderCurveNet.cpp index 976b89fbfc..3a00cd53ad 100644 --- a/src/Mod/Part/Gui/ViewProviderCurveNet.cpp +++ b/src/Mod/Part/Gui/ViewProviderCurveNet.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -38,7 +36,7 @@ # include # include # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/ViewProviderCurveNet.h b/src/Mod/Part/Gui/ViewProviderCurveNet.h index 46605917ea..37bc12a5da 100644 --- a/src/Mod/Part/Gui/ViewProviderCurveNet.h +++ b/src/Mod/Part/Gui/ViewProviderCurveNet.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERCURVENET_H #define PARTGUI_VIEWPROVIDERCURVENET_H +#include + #include "ViewProvider.h" diff --git a/src/Mod/Part/Gui/ViewProviderCylinderParametric.cpp b/src/Mod/Part/Gui/ViewProviderCylinderParametric.cpp index 00cf7b057d..1004d15594 100644 --- a/src/Mod/Part/Gui/ViewProviderCylinderParametric.cpp +++ b/src/Mod/Part/Gui/ViewProviderCylinderParametric.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderCylinderParametric.h" diff --git a/src/Mod/Part/Gui/ViewProviderCylinderParametric.h b/src/Mod/Part/Gui/ViewProviderCylinderParametric.h index 1070cd2f75..f22672878f 100644 --- a/src/Mod/Part/Gui/ViewProviderCylinderParametric.h +++ b/src/Mod/Part/Gui/ViewProviderCylinderParametric.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERCYLINDERPARAMETRIC_H #define PARTGUI_VIEWPROVIDERCYLINDERPARAMETRIC_H +#include + #include "ViewProviderPrimitive.h" diff --git a/src/Mod/Part/Gui/ViewProviderDatum.cpp b/src/Mod/Part/Gui/ViewProviderDatum.cpp index 6b7373d1f3..c8036f18a7 100644 --- a/src/Mod/Part/Gui/ViewProviderDatum.cpp +++ b/src/Mod/Part/Gui/ViewProviderDatum.cpp @@ -20,12 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - -#ifndef _PreComp_ -#endif - #include #include #include diff --git a/src/Mod/Part/Gui/ViewProviderDatum.h b/src/Mod/Part/Gui/ViewProviderDatum.h index 46d232e80c..701de8af3b 100644 --- a/src/Mod/Part/Gui/ViewProviderDatum.h +++ b/src/Mod/Part/Gui/ViewProviderDatum.h @@ -30,6 +30,8 @@ #include #include +#include + #include namespace PartGui { diff --git a/src/Mod/Part/Gui/ViewProviderEllipseParametric.cpp b/src/Mod/Part/Gui/ViewProviderEllipseParametric.cpp index c1831b0b08..fd999dd4ed 100644 --- a/src/Mod/Part/Gui/ViewProviderEllipseParametric.cpp +++ b/src/Mod/Part/Gui/ViewProviderEllipseParametric.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderEllipseParametric.h" diff --git a/src/Mod/Part/Gui/ViewProviderEllipseParametric.h b/src/Mod/Part/Gui/ViewProviderEllipseParametric.h index f33ca2bb23..882b7ba6ae 100644 --- a/src/Mod/Part/Gui/ViewProviderEllipseParametric.h +++ b/src/Mod/Part/Gui/ViewProviderEllipseParametric.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERELLIPSEPARAMETRIC_H #define PARTGUI_VIEWPROVIDERELLIPSEPARAMETRIC_H +#include + #include "ViewProviderPrimitive.h" diff --git a/src/Mod/Part/Gui/ViewProviderExt.cpp b/src/Mod/Part/Gui/ViewProviderExt.cpp index 23a79fb659..6704284880 100644 --- a/src/Mod/Part/Gui/ViewProviderExt.cpp +++ b/src/Mod/Part/Gui/ViewProviderExt.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ # include # include # include @@ -68,7 +65,6 @@ # include # include -#endif #include #include diff --git a/src/Mod/Part/Gui/ViewProviderExtrusion.cpp b/src/Mod/Part/Gui/ViewProviderExtrusion.cpp index de0626ec95..c8da025909 100644 --- a/src/Mod/Part/Gui/ViewProviderExtrusion.cpp +++ b/src/Mod/Part/Gui/ViewProviderExtrusion.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderExtrusion.h" #include diff --git a/src/Mod/Part/Gui/ViewProviderExtrusion.h b/src/Mod/Part/Gui/ViewProviderExtrusion.h index 44ca9b538d..661287f51e 100644 --- a/src/Mod/Part/Gui/ViewProviderExtrusion.h +++ b/src/Mod/Part/Gui/ViewProviderExtrusion.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDEREXTRUSION_H #define PARTGUI_VIEWPROVIDEREXTRUSION_H +#include + #include "ViewProvider.h" diff --git a/src/Mod/Part/Gui/ViewProviderGridExtension.cpp b/src/Mod/Part/Gui/ViewProviderGridExtension.cpp index 0880d2fb9d..06fd701d28 100644 --- a/src/Mod/Part/Gui/ViewProviderGridExtension.cpp +++ b/src/Mod/Part/Gui/ViewProviderGridExtension.cpp @@ -20,10 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ - # include # include @@ -37,7 +33,6 @@ # include # include -#endif #include #include diff --git a/src/Mod/Part/Gui/ViewProviderHelixParametric.cpp b/src/Mod/Part/Gui/ViewProviderHelixParametric.cpp index bc187e3c30..cedf9156d1 100644 --- a/src/Mod/Part/Gui/ViewProviderHelixParametric.cpp +++ b/src/Mod/Part/Gui/ViewProviderHelixParametric.cpp @@ -21,11 +21,9 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include "ViewProviderHelixParametric.h" diff --git a/src/Mod/Part/Gui/ViewProviderHelixParametric.h b/src/Mod/Part/Gui/ViewProviderHelixParametric.h index 8a567ed0a3..888530252d 100644 --- a/src/Mod/Part/Gui/ViewProviderHelixParametric.h +++ b/src/Mod/Part/Gui/ViewProviderHelixParametric.h @@ -27,6 +27,8 @@ #include "ViewProviderSpline.h" #include "ViewProviderPrimitive.h" +#include + namespace PartGui { diff --git a/src/Mod/Part/Gui/ViewProviderImport.cpp b/src/Mod/Part/Gui/ViewProviderImport.cpp index 743f9016c8..54e03bd9be 100644 --- a/src/Mod/Part/Gui/ViewProviderImport.cpp +++ b/src/Mod/Part/Gui/ViewProviderImport.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderImport.h" diff --git a/src/Mod/Part/Gui/ViewProviderImport.h b/src/Mod/Part/Gui/ViewProviderImport.h index 448767872d..e7f44c150f 100644 --- a/src/Mod/Part/Gui/ViewProviderImport.h +++ b/src/Mod/Part/Gui/ViewProviderImport.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEVPROVIDERIMPORT_H #define PARTGUI_VIEVPROVIDERIMPORT_H +#include + #include "ViewProvider.h" diff --git a/src/Mod/Part/Gui/ViewProviderLineParametric.cpp b/src/Mod/Part/Gui/ViewProviderLineParametric.cpp index c4222aa6ed..fc59f9af15 100644 --- a/src/Mod/Part/Gui/ViewProviderLineParametric.cpp +++ b/src/Mod/Part/Gui/ViewProviderLineParametric.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderLineParametric.h" diff --git a/src/Mod/Part/Gui/ViewProviderLineParametric.h b/src/Mod/Part/Gui/ViewProviderLineParametric.h index ca4c8117f5..bc084e16af 100644 --- a/src/Mod/Part/Gui/ViewProviderLineParametric.h +++ b/src/Mod/Part/Gui/ViewProviderLineParametric.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERLINEPARAMETRIC_H #define PARTGUI_VIEWPROVIDERLINEPARAMETRIC_H +#include + #include "ViewProviderPrimitive.h" diff --git a/src/Mod/Part/Gui/ViewProviderMirror.cpp b/src/Mod/Part/Gui/ViewProviderMirror.cpp index 9ef1481f3a..05f1e7cc80 100644 --- a/src/Mod/Part/Gui/ViewProviderMirror.cpp +++ b/src/Mod/Part/Gui/ViewProviderMirror.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ # include # include # include @@ -37,7 +34,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/Part/Gui/ViewProviderMirror.h b/src/Mod/Part/Gui/ViewProviderMirror.h index bf68790d1b..f121620542 100644 --- a/src/Mod/Part/Gui/ViewProviderMirror.h +++ b/src/Mod/Part/Gui/ViewProviderMirror.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERMIRROR_H #define PARTGUI_VIEWPROVIDERMIRROR_H +#include + #include namespace PartGui { diff --git a/src/Mod/Part/Gui/ViewProviderPartExtPyImp.cpp b/src/Mod/Part/Gui/ViewProviderPartExtPyImp.cpp index 301033a50c..8616434d09 100644 --- a/src/Mod/Part/Gui/ViewProviderPartExtPyImp.cpp +++ b/src/Mod/Part/Gui/ViewProviderPartExtPyImp.cpp @@ -21,11 +21,9 @@ * * **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Part/Gui/ViewProviderPlaneParametric.cpp b/src/Mod/Part/Gui/ViewProviderPlaneParametric.cpp index e5ccfb784d..2973a92bb4 100644 --- a/src/Mod/Part/Gui/ViewProviderPlaneParametric.cpp +++ b/src/Mod/Part/Gui/ViewProviderPlaneParametric.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderPlaneParametric.h" #include diff --git a/src/Mod/Part/Gui/ViewProviderPlaneParametric.h b/src/Mod/Part/Gui/ViewProviderPlaneParametric.h index 91414db8d6..ca3f4e2aae 100644 --- a/src/Mod/Part/Gui/ViewProviderPlaneParametric.h +++ b/src/Mod/Part/Gui/ViewProviderPlaneParametric.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERPLANEPARAMETRIC_H #define PARTGUI_VIEWPROVIDERPLANEPARAMETRIC_H +#include + #include "ViewProviderPrimitive.h" diff --git a/src/Mod/Part/Gui/ViewProviderPointParametric.cpp b/src/Mod/Part/Gui/ViewProviderPointParametric.cpp index 8e53239152..f29765b650 100644 --- a/src/Mod/Part/Gui/ViewProviderPointParametric.cpp +++ b/src/Mod/Part/Gui/ViewProviderPointParametric.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderPointParametric.h" diff --git a/src/Mod/Part/Gui/ViewProviderPointParametric.h b/src/Mod/Part/Gui/ViewProviderPointParametric.h index 32ff1f6d0b..95c36b6c1b 100644 --- a/src/Mod/Part/Gui/ViewProviderPointParametric.h +++ b/src/Mod/Part/Gui/ViewProviderPointParametric.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERPOINTPARAMETRIC_H #define PARTGUI_VIEWPROVIDERPOINTPARAMETRIC_H +#include + #include "ViewProviderPrimitive.h" diff --git a/src/Mod/Part/Gui/ViewProviderPreviewExtension.cpp b/src/Mod/Part/Gui/ViewProviderPreviewExtension.cpp index 6e8424cf6c..b00c2068f0 100644 --- a/src/Mod/Part/Gui/ViewProviderPreviewExtension.cpp +++ b/src/Mod/Part/Gui/ViewProviderPreviewExtension.cpp @@ -21,16 +21,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ # include # include # include # include # include # include -#endif #include "ViewProviderPreviewExtension.h" #include "ViewProviderExt.h" diff --git a/src/Mod/Part/Gui/ViewProviderPreviewExtension.h b/src/Mod/Part/Gui/ViewProviderPreviewExtension.h index 96ed17bfd2..df26779b9a 100644 --- a/src/Mod/Part/Gui/ViewProviderPreviewExtension.h +++ b/src/Mod/Part/Gui/ViewProviderPreviewExtension.h @@ -43,6 +43,7 @@ #include #include #include +#include namespace PartGui { diff --git a/src/Mod/Part/Gui/ViewProviderPrimitive.cpp b/src/Mod/Part/Gui/ViewProviderPrimitive.cpp index 6b926e5493..93a675ce3a 100644 --- a/src/Mod/Part/Gui/ViewProviderPrimitive.cpp +++ b/src/Mod/Part/Gui/ViewProviderPrimitive.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include -#endif + #include #include diff --git a/src/Mod/Part/Gui/ViewProviderPrimitive.h b/src/Mod/Part/Gui/ViewProviderPrimitive.h index cefacdf979..ec82998b8d 100644 --- a/src/Mod/Part/Gui/ViewProviderPrimitive.h +++ b/src/Mod/Part/Gui/ViewProviderPrimitive.h @@ -26,6 +26,7 @@ #include #include +#include namespace PartGui { diff --git a/src/Mod/Part/Gui/ViewProviderPrism.cpp b/src/Mod/Part/Gui/ViewProviderPrism.cpp index d125e05ae5..799f5f8216 100644 --- a/src/Mod/Part/Gui/ViewProviderPrism.cpp +++ b/src/Mod/Part/Gui/ViewProviderPrism.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderPrism.h" diff --git a/src/Mod/Part/Gui/ViewProviderPrism.h b/src/Mod/Part/Gui/ViewProviderPrism.h index e829215b87..4ee45e21db 100644 --- a/src/Mod/Part/Gui/ViewProviderPrism.h +++ b/src/Mod/Part/Gui/ViewProviderPrism.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERPRISM_H #define PARTGUI_VIEWPROVIDERPRISM_H +#include + #include "ViewProviderPrimitive.h" diff --git a/src/Mod/Part/Gui/ViewProviderProjectOnSurface.cpp b/src/Mod/Part/Gui/ViewProviderProjectOnSurface.cpp index 686da3628c..1da0eccb0a 100644 --- a/src/Mod/Part/Gui/ViewProviderProjectOnSurface.cpp +++ b/src/Mod/Part/Gui/ViewProviderProjectOnSurface.cpp @@ -22,11 +22,9 @@ * * **************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include "ViewProviderProjectOnSurface.h" #include "DlgProjectionOnSurface.h" diff --git a/src/Mod/Part/Gui/ViewProviderProjectOnSurface.h b/src/Mod/Part/Gui/ViewProviderProjectOnSurface.h index 1575afb299..93d79d99f4 100644 --- a/src/Mod/Part/Gui/ViewProviderProjectOnSurface.h +++ b/src/Mod/Part/Gui/ViewProviderProjectOnSurface.h @@ -26,6 +26,8 @@ #ifndef PARTGUI_VIEWPROVIDERPROJECTONSURFACE_H #define PARTGUI_VIEWPROVIDERPROJECTONSURFACE_H +#include + #include diff --git a/src/Mod/Part/Gui/ViewProviderPython.cpp b/src/Mod/Part/Gui/ViewProviderPython.cpp index 84e9ff2225..4a9566af9d 100644 --- a/src/Mod/Part/Gui/ViewProviderPython.cpp +++ b/src/Mod/Part/Gui/ViewProviderPython.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include "ViewProviderPython.h" diff --git a/src/Mod/Part/Gui/ViewProviderPython.h b/src/Mod/Part/Gui/ViewProviderPython.h index ac9b6883fa..734ac71204 100644 --- a/src/Mod/Part/Gui/ViewProviderPython.h +++ b/src/Mod/Part/Gui/ViewProviderPython.h @@ -27,6 +27,8 @@ #include #include +#include + namespace PartGui { class PartGuiExport ViewProviderCustom : public ViewProviderPart diff --git a/src/Mod/Part/Gui/ViewProviderReference.cpp b/src/Mod/Part/Gui/ViewProviderReference.cpp index b679a7d60a..a17a8f40db 100644 --- a/src/Mod/Part/Gui/ViewProviderReference.cpp +++ b/src/Mod/Part/Gui/ViewProviderReference.cpp @@ -20,15 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ # include # include # include # include -#endif #include #include diff --git a/src/Mod/Part/Gui/ViewProviderRegularPolygon.cpp b/src/Mod/Part/Gui/ViewProviderRegularPolygon.cpp index 75bff76bb8..43a65300fe 100644 --- a/src/Mod/Part/Gui/ViewProviderRegularPolygon.cpp +++ b/src/Mod/Part/Gui/ViewProviderRegularPolygon.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderRegularPolygon.h" diff --git a/src/Mod/Part/Gui/ViewProviderRegularPolygon.h b/src/Mod/Part/Gui/ViewProviderRegularPolygon.h index 0052fb993d..b50947d08f 100644 --- a/src/Mod/Part/Gui/ViewProviderRegularPolygon.h +++ b/src/Mod/Part/Gui/ViewProviderRegularPolygon.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERREGULARPOLYGON_H #define PARTGUI_VIEWPROVIDERREGULARPOLYGON_H +#include + #include "ViewProviderPrimitive.h" diff --git a/src/Mod/Part/Gui/ViewProviderRuledSurface.cpp b/src/Mod/Part/Gui/ViewProviderRuledSurface.cpp index 1237215762..8a249ff18b 100644 --- a/src/Mod/Part/Gui/ViewProviderRuledSurface.cpp +++ b/src/Mod/Part/Gui/ViewProviderRuledSurface.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Part/Gui/ViewProviderRuledSurface.h b/src/Mod/Part/Gui/ViewProviderRuledSurface.h index a0ddd06913..666165072d 100644 --- a/src/Mod/Part/Gui/ViewProviderRuledSurface.h +++ b/src/Mod/Part/Gui/ViewProviderRuledSurface.h @@ -23,6 +23,8 @@ #ifndef PARTGUI_VIEWPROVIDERRULEDSURFACE_H #define PARTGUI_VIEWPROVIDERRULEDSURFACE_H +#include + #include "ViewProvider.h" diff --git a/src/Mod/Part/Gui/ViewProviderScale.cpp b/src/Mod/Part/Gui/ViewProviderScale.cpp index 52124d1a19..6249fc5017 100644 --- a/src/Mod/Part/Gui/ViewProviderScale.cpp +++ b/src/Mod/Part/Gui/ViewProviderScale.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderScale.h" #include diff --git a/src/Mod/Part/Gui/ViewProviderScale.h b/src/Mod/Part/Gui/ViewProviderScale.h index 84261ab07b..59aa1de98f 100644 --- a/src/Mod/Part/Gui/ViewProviderScale.h +++ b/src/Mod/Part/Gui/ViewProviderScale.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERSCALE_H #define PARTGUI_VIEWPROVIDERSCALE_H +#include + #include "ViewProvider.h" diff --git a/src/Mod/Part/Gui/ViewProviderSphereParametric.cpp b/src/Mod/Part/Gui/ViewProviderSphereParametric.cpp index fc7bc85e81..b7079d6e95 100644 --- a/src/Mod/Part/Gui/ViewProviderSphereParametric.cpp +++ b/src/Mod/Part/Gui/ViewProviderSphereParametric.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderSphereParametric.h" diff --git a/src/Mod/Part/Gui/ViewProviderSphereParametric.h b/src/Mod/Part/Gui/ViewProviderSphereParametric.h index 08cc382e63..7f60f600a8 100644 --- a/src/Mod/Part/Gui/ViewProviderSphereParametric.h +++ b/src/Mod/Part/Gui/ViewProviderSphereParametric.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERSPHEREPARAMETRIC_H #define PARTGUI_VIEWPROVIDERSPHEREPARAMETRIC_H +#include + #include "ViewProviderPrimitive.h" namespace PartGui { diff --git a/src/Mod/Part/Gui/ViewProviderSpline.cpp b/src/Mod/Part/Gui/ViewProviderSpline.cpp index 8271dec65f..b4aaa38f25 100644 --- a/src/Mod/Part/Gui/ViewProviderSpline.cpp +++ b/src/Mod/Part/Gui/ViewProviderSpline.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include @@ -43,7 +41,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/Part/Gui/ViewProviderSpline.h b/src/Mod/Part/Gui/ViewProviderSpline.h index c958257d8b..3d26763404 100644 --- a/src/Mod/Part/Gui/ViewProviderSpline.h +++ b/src/Mod/Part/Gui/ViewProviderSpline.h @@ -26,6 +26,8 @@ #include #include +#include + namespace PartGui { diff --git a/src/Mod/Part/Gui/ViewProviderTorusParametric.cpp b/src/Mod/Part/Gui/ViewProviderTorusParametric.cpp index 0e9cf97e74..61cc4d589e 100644 --- a/src/Mod/Part/Gui/ViewProviderTorusParametric.cpp +++ b/src/Mod/Part/Gui/ViewProviderTorusParametric.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "ViewProviderTorusParametric.h" diff --git a/src/Mod/Part/Gui/ViewProviderTorusParametric.h b/src/Mod/Part/Gui/ViewProviderTorusParametric.h index fe50673567..459f5ca6f6 100644 --- a/src/Mod/Part/Gui/ViewProviderTorusParametric.h +++ b/src/Mod/Part/Gui/ViewProviderTorusParametric.h @@ -24,6 +24,8 @@ #ifndef PARTGUI_VIEWPROVIDERTORUSPARAMETRIC_H #define PARTGUI_VIEWPROVIDERTORUSPARAMETRIC_H +#include + #include "ViewProviderPrimitive.h" diff --git a/src/Mod/Part/Gui/Workbench.cpp b/src/Mod/Part/Gui/Workbench.cpp index 05f3b07dcb..27fb6742da 100644 --- a/src/Mod/Part/Gui/Workbench.cpp +++ b/src/Mod/Part/Gui/Workbench.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "Workbench.h" #include diff --git a/src/Mod/Part/Gui/WorkbenchManipulator.cpp b/src/Mod/Part/Gui/WorkbenchManipulator.cpp index 743b6cd1a2..eef71b69f7 100644 --- a/src/Mod/Part/Gui/WorkbenchManipulator.cpp +++ b/src/Mod/Part/Gui/WorkbenchManipulator.cpp @@ -22,7 +22,6 @@ **************************************************************************/ -#include "PreCompiled.h" #include "WorkbenchManipulator.h" #include #include From b15f3c11550b34a9dc18f13014d2fd7cd137631a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sun, 21 Sep 2025 23:22:18 +0200 Subject: [PATCH 13/17] Robot: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- src/Mod/Robot/App/AppRobot.cpp | 1 - src/Mod/Robot/App/CMakeLists.txt | 7 +++--- src/Mod/Robot/App/Edge2TracObject.cpp | 4 +--- src/Mod/Robot/App/Edge2TracObject.h | 2 ++ src/Mod/Robot/App/PreCompiled.cpp | 23 ------------------- src/Mod/Robot/App/PreCompiled.h | 14 ----------- src/Mod/Robot/App/PropertyTrajectory.cpp | 4 +--- src/Mod/Robot/App/PropertyTrajectory.h | 2 ++ src/Mod/Robot/App/Robot6Axis.cpp | 4 +--- src/Mod/Robot/App/Robot6AxisPyImp.cpp | 4 +--- src/Mod/Robot/App/RobotAlgos.cpp | 4 +--- src/Mod/Robot/App/RobotObject.cpp | 1 - src/Mod/Robot/App/RobotObject.h | 2 ++ src/Mod/Robot/App/RobotObjectPyImp.cpp | 1 - src/Mod/Robot/App/Simulation.cpp | 1 - src/Mod/Robot/App/Simulation.h | 2 ++ src/Mod/Robot/App/Trajectory.cpp | 3 --- src/Mod/Robot/App/Trajectory.h | 2 ++ src/Mod/Robot/App/TrajectoryCompound.cpp | 1 - src/Mod/Robot/App/TrajectoryCompound.h | 2 ++ src/Mod/Robot/App/TrajectoryDressUpObject.cpp | 1 - src/Mod/Robot/App/TrajectoryDressUpObject.h | 2 ++ src/Mod/Robot/App/TrajectoryObject.cpp | 1 - src/Mod/Robot/App/TrajectoryObject.h | 2 ++ src/Mod/Robot/App/TrajectoryPyImp.cpp | 1 - src/Mod/Robot/App/Waypoint.cpp | 4 +--- src/Mod/Robot/App/WaypointPyImp.cpp | 1 - src/Mod/Robot/Gui/AppRobotGui.cpp | 1 - src/Mod/Robot/Gui/CMakeLists.txt | 13 +++++------ src/Mod/Robot/Gui/Command.cpp | 4 +--- src/Mod/Robot/Gui/CommandExport.cpp | 4 +--- src/Mod/Robot/Gui/CommandInsertRobot.cpp | 4 +--- src/Mod/Robot/Gui/CommandTrajectory.cpp | 4 +--- src/Mod/Robot/Gui/PreCompiled.cpp | 23 ------------------- src/Mod/Robot/Gui/PreCompiled.h | 17 -------------- src/Mod/Robot/Gui/TaskDlgEdge2Trac.cpp | 4 +--- src/Mod/Robot/Gui/TaskDlgEdge2Trac.h | 2 ++ src/Mod/Robot/Gui/TaskDlgSimulate.cpp | 1 - src/Mod/Robot/Gui/TaskDlgSimulate.h | 1 + .../Robot/Gui/TaskDlgTrajectoryCompound.cpp | 4 +--- src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.h | 2 ++ .../Robot/Gui/TaskDlgTrajectoryDressUp.cpp | 1 - src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.h | 2 ++ src/Mod/Robot/Gui/TaskEdge2TracParameter.cpp | 4 +--- src/Mod/Robot/Gui/TaskRobot6Axis.cpp | 4 +--- src/Mod/Robot/Gui/TaskRobotControl.cpp | 1 - src/Mod/Robot/Gui/TaskRobotMessages.cpp | 1 - src/Mod/Robot/Gui/TaskTrajectory.cpp | 1 - .../Gui/TaskTrajectoryDressUpParameter.cpp | 4 +--- src/Mod/Robot/Gui/TaskWatcher.cpp | 1 - src/Mod/Robot/Gui/TaskWatcher.h | 2 ++ src/Mod/Robot/Gui/TrajectorySimulate.cpp | 4 +--- .../Robot/Gui/ViewProviderEdge2TracObject.cpp | 1 - .../Robot/Gui/ViewProviderEdge2TracObject.h | 2 ++ src/Mod/Robot/Gui/ViewProviderRobotObject.cpp | 3 --- src/Mod/Robot/Gui/ViewProviderTrajectory.cpp | 3 --- .../Gui/ViewProviderTrajectoryCompound.cpp | 1 - .../Gui/ViewProviderTrajectoryCompound.h | 2 ++ .../Gui/ViewProviderTrajectoryDressUp.cpp | 1 - .../Robot/Gui/ViewProviderTrajectoryDressUp.h | 2 ++ src/Mod/Robot/Gui/Workbench.cpp | 4 +--- src/Mod/Robot/RobotGlobal.h | 3 +-- 62 files changed, 58 insertions(+), 169 deletions(-) delete mode 100644 src/Mod/Robot/App/PreCompiled.cpp delete mode 100644 src/Mod/Robot/Gui/PreCompiled.cpp diff --git a/src/Mod/Robot/App/AppRobot.cpp b/src/Mod/Robot/App/AppRobot.cpp index c6e286fdac..218818d47a 100644 --- a/src/Mod/Robot/App/AppRobot.cpp +++ b/src/Mod/Robot/App/AppRobot.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Robot/App/CMakeLists.txt b/src/Mod/Robot/App/CMakeLists.txt index 816efbeb1e..fb5d767c42 100644 --- a/src/Mod/Robot/App/CMakeLists.txt +++ b/src/Mod/Robot/App/CMakeLists.txt @@ -42,7 +42,6 @@ SET(Python_SRCS SET(Mod_SRCS AppRobot.cpp - PreCompiled.cpp PreCompiled.h ) @@ -74,9 +73,9 @@ SET(Robot_SRCS ) if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${Robot_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(Robot PreCompiled.h PreCompiled.cpp PCH_SRCS) + target_precompile_headers(Robot PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) endif(FREECAD_USE_PCH) # FIXME: The bundled KDL has some extensions which makes it incompatible diff --git a/src/Mod/Robot/App/Edge2TracObject.cpp b/src/Mod/Robot/App/Edge2TracObject.cpp index 24636dc027..fcbada9faa 100644 --- a/src/Mod/Robot/App/Edge2TracObject.cpp +++ b/src/Mod/Robot/App/Edge2TracObject.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include -#endif + #include #include diff --git a/src/Mod/Robot/App/Edge2TracObject.h b/src/Mod/Robot/App/Edge2TracObject.h index 4e07c89628..6526e83b0d 100644 --- a/src/Mod/Robot/App/Edge2TracObject.h +++ b/src/Mod/Robot/App/Edge2TracObject.h @@ -25,6 +25,8 @@ #include +#include + #include "TrajectoryObject.h" diff --git a/src/Mod/Robot/App/PreCompiled.cpp b/src/Mod/Robot/App/PreCompiled.cpp deleted file mode 100644 index cde4369c5b..0000000000 --- a/src/Mod/Robot/App/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2008 Jürgen Riegel * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/Robot/App/PreCompiled.h b/src/Mod/Robot/App/PreCompiled.h index 3a032ddf8a..c65b9cb243 100644 --- a/src/Mod/Robot/App/PreCompiled.h +++ b/src/Mod/Robot/App/PreCompiled.h @@ -25,19 +25,6 @@ #include -// Exporting of App classes -#ifdef FC_OS_WIN32 -#define RobotExport __declspec(dllexport) -#define PartExport __declspec(dllimport) -#define MeshExport __declspec(dllimport) -#else // for Linux -#define RobotExport -#define PartExport -#define MeshExport -#endif - -#ifdef _PreComp_ - // STL #include #include @@ -63,5 +50,4 @@ #include #include -#endif // _PreComp_ #endif diff --git a/src/Mod/Robot/App/PropertyTrajectory.cpp b/src/Mod/Robot/App/PropertyTrajectory.cpp index 1926fcaec5..cb1ba0c26a 100644 --- a/src/Mod/Robot/App/PropertyTrajectory.cpp +++ b/src/Mod/Robot/App/PropertyTrajectory.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Robot/App/PropertyTrajectory.h b/src/Mod/Robot/App/PropertyTrajectory.h index 4593b8b995..5897782bc9 100644 --- a/src/Mod/Robot/App/PropertyTrajectory.h +++ b/src/Mod/Robot/App/PropertyTrajectory.h @@ -26,6 +26,8 @@ #include #include +#include + #include "Trajectory.h" diff --git a/src/Mod/Robot/App/Robot6Axis.cpp b/src/Mod/Robot/App/Robot6Axis.cpp index c20d630222..a46a4ad264 100644 --- a/src/Mod/Robot/App/Robot6Axis.cpp +++ b/src/Mod/Robot/App/Robot6Axis.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include "kdl_cp/chainfksolverpos_recursive.hpp" #include "kdl_cp/chainiksolverpos_nr_jl.hpp" #include "kdl_cp/chainiksolvervel_pinv.hpp" -#endif + #include #include diff --git a/src/Mod/Robot/App/Robot6AxisPyImp.cpp b/src/Mod/Robot/App/Robot6AxisPyImp.cpp index 9dd6eba69d..a9f59a36d4 100644 --- a/src/Mod/Robot/App/Robot6AxisPyImp.cpp +++ b/src/Mod/Robot/App/Robot6AxisPyImp.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Robot/App/RobotAlgos.cpp b/src/Mod/Robot/App/RobotAlgos.cpp index 28738bd48e..04382ff4fa 100644 --- a/src/Mod/Robot/App/RobotAlgos.cpp +++ b/src/Mod/Robot/App/RobotAlgos.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include "kdl_cp/chainfksolverpos_recursive.hpp" #include "kdl_cp/chainiksolverpos_nr.hpp" #include "kdl_cp/chainiksolvervel_pinv.hpp" #include "kdl_cp/frames_io.hpp" -#endif + #include "RobotAlgos.h" diff --git a/src/Mod/Robot/App/RobotObject.cpp b/src/Mod/Robot/App/RobotObject.cpp index ed4b094ed3..ec80dd5281 100644 --- a/src/Mod/Robot/App/RobotObject.cpp +++ b/src/Mod/Robot/App/RobotObject.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Robot/App/RobotObject.h b/src/Mod/Robot/App/RobotObject.h index 273c275f4e..1cb39af514 100644 --- a/src/Mod/Robot/App/RobotObject.h +++ b/src/Mod/Robot/App/RobotObject.h @@ -26,6 +26,8 @@ #include #include +#include + #include "Robot6Axis.h" diff --git a/src/Mod/Robot/App/RobotObjectPyImp.cpp b/src/Mod/Robot/App/RobotObjectPyImp.cpp index 4bb779a232..3a58b6ea73 100644 --- a/src/Mod/Robot/App/RobotObjectPyImp.cpp +++ b/src/Mod/Robot/App/RobotObjectPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" // clang-format off // inclusion of the generated files (generated out of RobotObjectPy.xml) diff --git a/src/Mod/Robot/App/Simulation.cpp b/src/Mod/Robot/App/Simulation.cpp index 637a84bd58..caa1698dbc 100644 --- a/src/Mod/Robot/App/Simulation.cpp +++ b/src/Mod/Robot/App/Simulation.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "Simulation.h" diff --git a/src/Mod/Robot/App/Simulation.h b/src/Mod/Robot/App/Simulation.h index 67fadc8dc0..37d9ced27c 100644 --- a/src/Mod/Robot/App/Simulation.h +++ b/src/Mod/Robot/App/Simulation.h @@ -25,6 +25,8 @@ #include +#include + #include "Robot6Axis.h" #include "Trajectory.h" diff --git a/src/Mod/Robot/App/Trajectory.cpp b/src/Mod/Robot/App/Trajectory.cpp index 9cfc704604..299c0e3e1b 100644 --- a/src/Mod/Robot/App/Trajectory.cpp +++ b/src/Mod/Robot/App/Trajectory.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include "kdl_cp/path_line.hpp" @@ -32,7 +30,6 @@ #include "kdl_cp/trajectory_segment.hpp" #include "kdl_cp/utilities/error.h" #include "kdl_cp/velocityprofile_trap.hpp" -#endif #include #include diff --git a/src/Mod/Robot/App/Trajectory.h b/src/Mod/Robot/App/Trajectory.h index 1a9cb4c722..44d93344f0 100644 --- a/src/Mod/Robot/App/Trajectory.h +++ b/src/Mod/Robot/App/Trajectory.h @@ -28,6 +28,8 @@ #include #include +#include + #include "Waypoint.h" diff --git a/src/Mod/Robot/App/TrajectoryCompound.cpp b/src/Mod/Robot/App/TrajectoryCompound.cpp index d6c6811582..934e489a74 100644 --- a/src/Mod/Robot/App/TrajectoryCompound.cpp +++ b/src/Mod/Robot/App/TrajectoryCompound.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "TrajectoryCompound.h" #include "Waypoint.h" diff --git a/src/Mod/Robot/App/TrajectoryCompound.h b/src/Mod/Robot/App/TrajectoryCompound.h index afb7ddb64e..c44a920a8a 100644 --- a/src/Mod/Robot/App/TrajectoryCompound.h +++ b/src/Mod/Robot/App/TrajectoryCompound.h @@ -25,6 +25,8 @@ #include +#include + #include "TrajectoryObject.h" diff --git a/src/Mod/Robot/App/TrajectoryDressUpObject.cpp b/src/Mod/Robot/App/TrajectoryDressUpObject.cpp index 54d6a4906f..ac254fb146 100644 --- a/src/Mod/Robot/App/TrajectoryDressUpObject.cpp +++ b/src/Mod/Robot/App/TrajectoryDressUpObject.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "TrajectoryDressUpObject.h" #include "Waypoint.h" diff --git a/src/Mod/Robot/App/TrajectoryDressUpObject.h b/src/Mod/Robot/App/TrajectoryDressUpObject.h index 2e763e7de7..8102249622 100644 --- a/src/Mod/Robot/App/TrajectoryDressUpObject.h +++ b/src/Mod/Robot/App/TrajectoryDressUpObject.h @@ -26,6 +26,8 @@ #include #include +#include + #include "TrajectoryObject.h" diff --git a/src/Mod/Robot/App/TrajectoryObject.cpp b/src/Mod/Robot/App/TrajectoryObject.cpp index c627f34a0a..4d2bf2da19 100644 --- a/src/Mod/Robot/App/TrajectoryObject.cpp +++ b/src/Mod/Robot/App/TrajectoryObject.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Robot/App/TrajectoryObject.h b/src/Mod/Robot/App/TrajectoryObject.h index 44aabdbe94..2ba9d4c1b1 100644 --- a/src/Mod/Robot/App/TrajectoryObject.h +++ b/src/Mod/Robot/App/TrajectoryObject.h @@ -26,6 +26,8 @@ #include #include +#include + #include "PropertyTrajectory.h" #include "Trajectory.h" diff --git a/src/Mod/Robot/App/TrajectoryPyImp.cpp b/src/Mod/Robot/App/TrajectoryPyImp.cpp index 159b59f623..70bcd7343f 100644 --- a/src/Mod/Robot/App/TrajectoryPyImp.cpp +++ b/src/Mod/Robot/App/TrajectoryPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/Robot/App/Waypoint.cpp b/src/Mod/Robot/App/Waypoint.cpp index 921eb166d0..c5ebb2f16d 100644 --- a/src/Mod/Robot/App/Waypoint.cpp +++ b/src/Mod/Robot/App/Waypoint.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include "kdl_cp/chain.hpp" -#endif + #include #include diff --git a/src/Mod/Robot/App/WaypointPyImp.cpp b/src/Mod/Robot/App/WaypointPyImp.cpp index 6c8870a0d9..2724b115f6 100644 --- a/src/Mod/Robot/App/WaypointPyImp.cpp +++ b/src/Mod/Robot/App/WaypointPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Robot/Gui/AppRobotGui.cpp b/src/Mod/Robot/Gui/AppRobotGui.cpp index 5e53149020..5aa0f8b894 100644 --- a/src/Mod/Robot/Gui/AppRobotGui.cpp +++ b/src/Mod/Robot/Gui/AppRobotGui.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Robot/Gui/CMakeLists.txt b/src/Mod/Robot/Gui/CMakeLists.txt index 1fcf6d5ec0..cb94c94e78 100644 --- a/src/Mod/Robot/Gui/CMakeLists.txt +++ b/src/Mod/Robot/Gui/CMakeLists.txt @@ -23,7 +23,6 @@ set(RobotGui_UIC_SRCS SET(RobotGui_SRCS_Module AppRobotGui.cpp Resources/Robot.qrc - PreCompiled.cpp PreCompiled.h Workbench.cpp Workbench.h @@ -101,18 +100,18 @@ SET(RobotGui_SRCS ${RobotGui_SRCS_TaskDlg} ) -if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${RobotGui_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(RobotGui PreCompiled.h PreCompiled.cpp PCH_SRCS) -endif(FREECAD_USE_PCH) - SET(RobotGuiIcon_SVG Resources/icons/RobotWorkbench.svg ) add_library(RobotGui SHARED ${RobotGui_SRCS} ${RobotGuiIcon_SVG}) +if(FREECAD_USE_PCH) + target_precompile_headers(RobotGui PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_include_directories( RobotGui PRIVATE diff --git a/src/Mod/Robot/Gui/Command.cpp b/src/Mod/Robot/Gui/Command.cpp index 0bb7cc4d4b..fd463e7928 100644 --- a/src/Mod/Robot/Gui/Command.cpp +++ b/src/Mod/Robot/Gui/Command.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Robot/Gui/CommandExport.cpp b/src/Mod/Robot/Gui/CommandExport.cpp index 3eb102d632..62ac369bc8 100644 --- a/src/Mod/Robot/Gui/CommandExport.cpp +++ b/src/Mod/Robot/Gui/CommandExport.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Robot/Gui/CommandInsertRobot.cpp b/src/Mod/Robot/Gui/CommandInsertRobot.cpp index 917fd3c5b3..2bbe5e8839 100644 --- a/src/Mod/Robot/Gui/CommandInsertRobot.cpp +++ b/src/Mod/Robot/Gui/CommandInsertRobot.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Robot/Gui/CommandTrajectory.cpp b/src/Mod/Robot/Gui/CommandTrajectory.cpp index a8c329b849..2cc9e2e763 100644 --- a/src/Mod/Robot/Gui/CommandTrajectory.cpp +++ b/src/Mod/Robot/Gui/CommandTrajectory.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/Robot/Gui/PreCompiled.cpp b/src/Mod/Robot/Gui/PreCompiled.cpp deleted file mode 100644 index cde4369c5b..0000000000 --- a/src/Mod/Robot/Gui/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2008 Jürgen Riegel * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/Robot/Gui/PreCompiled.h b/src/Mod/Robot/Gui/PreCompiled.h index a83e4d0036..16cd9bcff4 100644 --- a/src/Mod/Robot/Gui/PreCompiled.h +++ b/src/Mod/Robot/Gui/PreCompiled.h @@ -25,21 +25,6 @@ #include -// Importing of App classes -#ifdef FC_OS_WIN32 -#define RobotExport __declspec(dllimport) -#define PartExport __declspec(dllimport) -#define PartGuiExport __declspec(dllimport) -#define RobotGuiExport __declspec(dllexport) -#else // for Linux -#define PartExport -#define RobotExport -#define PartGuiExport -#define RobotGuiExport -#endif - -#ifdef _PreComp_ - // STL #include @@ -71,6 +56,4 @@ #include #include -#endif //_PreComp_ - #endif // ROBOTGUI_PRECOMPILED_H diff --git a/src/Mod/Robot/Gui/TaskDlgEdge2Trac.cpp b/src/Mod/Robot/Gui/TaskDlgEdge2Trac.cpp index c6ee2e283a..a5cb94cdd3 100644 --- a/src/Mod/Robot/Gui/TaskDlgEdge2Trac.cpp +++ b/src/Mod/Robot/Gui/TaskDlgEdge2Trac.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Robot/Gui/TaskDlgEdge2Trac.h b/src/Mod/Robot/Gui/TaskDlgEdge2Trac.h index 2517ed740e..90098d9c96 100644 --- a/src/Mod/Robot/Gui/TaskDlgEdge2Trac.h +++ b/src/Mod/Robot/Gui/TaskDlgEdge2Trac.h @@ -26,6 +26,8 @@ #include #include +#include + #include "TaskEdge2TracParameter.h" diff --git a/src/Mod/Robot/Gui/TaskDlgSimulate.cpp b/src/Mod/Robot/Gui/TaskDlgSimulate.cpp index 9404917579..1e74d411c7 100644 --- a/src/Mod/Robot/Gui/TaskDlgSimulate.cpp +++ b/src/Mod/Robot/Gui/TaskDlgSimulate.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "TaskDlgSimulate.h" diff --git a/src/Mod/Robot/Gui/TaskDlgSimulate.h b/src/Mod/Robot/Gui/TaskDlgSimulate.h index dcdf8863e2..b26c5579ad 100644 --- a/src/Mod/Robot/Gui/TaskDlgSimulate.h +++ b/src/Mod/Robot/Gui/TaskDlgSimulate.h @@ -26,6 +26,7 @@ #include #include #include +#include #include "TaskRobot6Axis.h" #include "TaskRobotControl.h" diff --git a/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.cpp b/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.cpp index 73b418b887..ef2f72fd15 100644 --- a/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.cpp +++ b/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.h b/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.h index 6d92f5f916..141078f3a6 100644 --- a/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.h +++ b/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.h @@ -24,6 +24,8 @@ #define ROBOTGUI_TaskDlgTrajectoryCompound_H #include + +#include #include diff --git a/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.cpp b/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.cpp index 3143bd682f..b88cc25faf 100644 --- a/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.cpp +++ b/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.h b/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.h index 45e7ebaa2f..95109791d2 100644 --- a/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.h +++ b/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.h @@ -26,6 +26,8 @@ #include #include +#include + #include "TaskTrajectoryDressUpParameter.h" diff --git a/src/Mod/Robot/Gui/TaskEdge2TracParameter.cpp b/src/Mod/Robot/Gui/TaskEdge2TracParameter.cpp index 9c3310fb51..08ab1a9dd6 100644 --- a/src/Mod/Robot/Gui/TaskEdge2TracParameter.cpp +++ b/src/Mod/Robot/Gui/TaskEdge2TracParameter.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Robot/Gui/TaskRobot6Axis.cpp b/src/Mod/Robot/Gui/TaskRobot6Axis.cpp index 030878c143..02cab68bf6 100644 --- a/src/Mod/Robot/Gui/TaskRobot6Axis.cpp +++ b/src/Mod/Robot/Gui/TaskRobot6Axis.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/Robot/Gui/TaskRobotControl.cpp b/src/Mod/Robot/Gui/TaskRobotControl.cpp index d21bcc1007..1a955248f1 100644 --- a/src/Mod/Robot/Gui/TaskRobotControl.cpp +++ b/src/Mod/Robot/Gui/TaskRobotControl.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/Robot/Gui/TaskRobotMessages.cpp b/src/Mod/Robot/Gui/TaskRobotMessages.cpp index ad15dd961a..5d1d043960 100644 --- a/src/Mod/Robot/Gui/TaskRobotMessages.cpp +++ b/src/Mod/Robot/Gui/TaskRobotMessages.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/Robot/Gui/TaskTrajectory.cpp b/src/Mod/Robot/Gui/TaskTrajectory.cpp index 39b1baf6f0..a284169367 100644 --- a/src/Mod/Robot/Gui/TaskTrajectory.cpp +++ b/src/Mod/Robot/Gui/TaskTrajectory.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.cpp b/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.cpp index 6fa4a341c3..308ba848e3 100644 --- a/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.cpp +++ b/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Robot/Gui/TaskWatcher.cpp b/src/Mod/Robot/Gui/TaskWatcher.cpp index 31df471ac3..506a9afed9 100644 --- a/src/Mod/Robot/Gui/TaskWatcher.cpp +++ b/src/Mod/Robot/Gui/TaskWatcher.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "TaskWatcher.h" diff --git a/src/Mod/Robot/Gui/TaskWatcher.h b/src/Mod/Robot/Gui/TaskWatcher.h index d9f5d5b866..b7b6cf0b25 100644 --- a/src/Mod/Robot/Gui/TaskWatcher.h +++ b/src/Mod/Robot/Gui/TaskWatcher.h @@ -25,6 +25,8 @@ #include +#include + #include "TaskRobot6Axis.h" #include "TaskRobotControl.h" diff --git a/src/Mod/Robot/Gui/TrajectorySimulate.cpp b/src/Mod/Robot/Gui/TrajectorySimulate.cpp index ec7c01455b..0fb09f788e 100644 --- a/src/Mod/Robot/Gui/TrajectorySimulate.cpp +++ b/src/Mod/Robot/Gui/TrajectorySimulate.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.cpp b/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.cpp index 6622490c6a..1777bdcb5e 100644 --- a/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.cpp +++ b/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.h b/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.h index 58251b1527..36445744f5 100644 --- a/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.h +++ b/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.h @@ -24,6 +24,8 @@ #ifndef ROBOT_VIEWPROVIDEREDGE2TRACOBJECT_H #define ROBOT_VIEWPROVIDEREDGE2TRACOBJECT_H +#include + #include "ViewProviderTrajectory.h" namespace RobotGui diff --git a/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp b/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp index 050541a5f0..8422ccef7f 100644 --- a/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp +++ b/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include @@ -32,7 +30,6 @@ #include #include #include -#endif #include #include diff --git a/src/Mod/Robot/Gui/ViewProviderTrajectory.cpp b/src/Mod/Robot/Gui/ViewProviderTrajectory.cpp index 4a10b13dfe..3da814e95d 100644 --- a/src/Mod/Robot/Gui/ViewProviderTrajectory.cpp +++ b/src/Mod/Robot/Gui/ViewProviderTrajectory.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -32,7 +30,6 @@ #include #include #include -#endif #include #include diff --git a/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.cpp b/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.cpp index bc1df62173..bb2ca67f41 100644 --- a/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.cpp +++ b/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.h b/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.h index edd584a6c9..aa5a466d5e 100644 --- a/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.h +++ b/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.h @@ -24,6 +24,8 @@ #ifndef ROBOT_ViewProviderTrajectoryCompound_H #define ROBOT_ViewProviderTrajectoryCompound_H +#include + #include "ViewProviderTrajectory.h" namespace RobotGui diff --git a/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.cpp b/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.cpp index 1d4f5769ac..03e22f808b 100644 --- a/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.cpp +++ b/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.h b/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.h index 764b09102f..75c828e2dd 100644 --- a/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.h +++ b/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.h @@ -24,6 +24,8 @@ #ifndef ROBOT_ViewProviderTrajectoryDressUp_H #define ROBOT_ViewProviderTrajectoryDressUp_H +#include + #include "ViewProviderTrajectory.h" namespace RobotGui diff --git a/src/Mod/Robot/Gui/Workbench.cpp b/src/Mod/Robot/Gui/Workbench.cpp index d38510dbf0..bbc10734dd 100644 --- a/src/Mod/Robot/Gui/Workbench.cpp +++ b/src/Mod/Robot/Gui/Workbench.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include -#endif + #include #include diff --git a/src/Mod/Robot/RobotGlobal.h b/src/Mod/Robot/RobotGlobal.h index d3e8537632..7830659c0e 100644 --- a/src/Mod/Robot/RobotGlobal.h +++ b/src/Mod/Robot/RobotGlobal.h @@ -20,11 +20,10 @@ * * ***************************************************************************/ -#include - #ifndef ROBOT_GLOBAL_H #define ROBOT_GLOBAL_H +#include // Robot #ifndef RobotExport From b864ccda6008e01c0cb161b581e02c3338b5676a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sun, 21 Sep 2025 23:36:45 +0200 Subject: [PATCH 14/17] CAM: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- src/Mod/CAM/App/AppPath.cpp | 1 - src/Mod/CAM/App/AppPathPy.cpp | 4 +--- src/Mod/CAM/App/Area.cpp | 3 --- src/Mod/CAM/App/AreaPyImp.cpp | 1 - src/Mod/CAM/App/CMakeLists.txt | 7 +++--- src/Mod/CAM/App/Command.cpp | 4 +--- src/Mod/CAM/App/CommandPyImp.cpp | 4 +--- src/Mod/CAM/App/FeatureArea.cpp | 4 +--- src/Mod/CAM/App/FeatureAreaPyImp.cpp | 1 - src/Mod/CAM/App/FeaturePath.cpp | 1 - src/Mod/CAM/App/FeaturePathCompound.cpp | 1 - src/Mod/CAM/App/FeaturePathCompoundPyImp.cpp | 1 - src/Mod/CAM/App/FeaturePathShape.cpp | 4 +--- src/Mod/CAM/App/Path.cpp | 1 - src/Mod/CAM/App/PathPyImp.cpp | 1 - src/Mod/CAM/App/PathSegmentWalker.cpp | 1 - src/Mod/CAM/App/PreCompiled.cpp | 24 ------------------- src/Mod/CAM/App/PreCompiled.h | 14 ----------- src/Mod/CAM/App/PropertyPath.cpp | 4 +--- src/Mod/CAM/App/Voronoi.cpp | 4 ---- src/Mod/CAM/App/VoronoiCell.cpp | 1 - src/Mod/CAM/App/VoronoiCellPyImp.cpp | 1 - src/Mod/CAM/App/VoronoiEdge.cpp | 1 - src/Mod/CAM/App/VoronoiEdgePyImp.cpp | 5 ++-- src/Mod/CAM/App/VoronoiPyImp.cpp | 1 - src/Mod/CAM/App/VoronoiVertex.cpp | 1 - src/Mod/CAM/App/VoronoiVertexPyImp.cpp | 1 - src/Mod/CAM/Gui/AppPathGui.cpp | 1 - src/Mod/CAM/Gui/AppPathGuiPy.cpp | 4 +--- src/Mod/CAM/Gui/CMakeLists.txt | 14 +++++------ src/Mod/CAM/Gui/Command.cpp | 4 +--- src/Mod/CAM/Gui/DlgProcessorChooser.cpp | 4 +--- src/Mod/CAM/Gui/DlgSettingsPathColor.cpp | 1 - src/Mod/CAM/Gui/PreCompiled.cpp | 23 ------------------ src/Mod/CAM/Gui/PreCompiled.h | 17 ------------- src/Mod/CAM/Gui/TaskDlgPathCompound.cpp | 4 +--- src/Mod/CAM/Gui/ViewProviderArea.cpp | 1 - src/Mod/CAM/Gui/ViewProviderPath.cpp | 4 ---- src/Mod/CAM/Gui/ViewProviderPathCompound.cpp | 1 - src/Mod/CAM/Gui/ViewProviderPathShape.cpp | 1 - .../PathSimulator/App/AppPathSimulator.cpp | 1 - src/Mod/CAM/PathSimulator/App/CMakeLists.txt | 1 - src/Mod/CAM/PathSimulator/App/PathSim.cpp | 1 - .../CAM/PathSimulator/App/PathSimPyImp.cpp | 1 - src/Mod/CAM/PathSimulator/App/PreCompiled.cpp | 23 ------------------ src/Mod/CAM/PathSimulator/App/PreCompiled.h | 3 --- src/Mod/CAM/PathSimulator/App/VolSim.cpp | 4 +--- .../PathSimulator/AppGL/AppCAMSimulator.cpp | 1 - src/Mod/CAM/PathSimulator/AppGL/CAMSim.cpp | 4 +--- .../CAM/PathSimulator/AppGL/CAMSimPyImp.cpp | 1 - .../CAM/PathSimulator/AppGL/CMakeLists.txt | 15 ++++++------ .../PathSimulator/AppGL/DlgCAMSimulator.cpp | 1 - .../CAM/PathSimulator/AppGL/PreCompiled.cpp | 23 ------------------ src/Mod/CAM/PathSimulator/AppGL/PreCompiled.h | 4 ---- 54 files changed, 32 insertions(+), 226 deletions(-) delete mode 100644 src/Mod/CAM/App/PreCompiled.cpp delete mode 100644 src/Mod/CAM/Gui/PreCompiled.cpp delete mode 100644 src/Mod/CAM/PathSimulator/App/PreCompiled.cpp delete mode 100644 src/Mod/CAM/PathSimulator/AppGL/PreCompiled.cpp diff --git a/src/Mod/CAM/App/AppPath.cpp b/src/Mod/CAM/App/AppPath.cpp index 2e57c22c85..f15464eff7 100644 --- a/src/Mod/CAM/App/AppPath.cpp +++ b/src/Mod/CAM/App/AppPath.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/CAM/App/AppPathPy.cpp b/src/Mod/CAM/App/AppPathPy.cpp index 1e73697a9e..139855ddc9 100644 --- a/src/Mod/CAM/App/AppPathPy.cpp +++ b/src/Mod/CAM/App/AppPathPy.cpp @@ -20,8 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -31,7 +29,7 @@ #include #include #include -#endif + #include #include diff --git a/src/Mod/CAM/App/Area.cpp b/src/Mod/CAM/App/Area.cpp index baaba58be5..d1cd77838f 100644 --- a/src/Mod/CAM/App/Area.cpp +++ b/src/Mod/CAM/App/Area.cpp @@ -20,12 +20,10 @@ * * ****************************************************************************/ -#include "PreCompiled.h" // From Boost 1.75 on the geometry component requires C++14 #define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING -#ifndef _PreComp_ #include #include @@ -67,7 +65,6 @@ #include #include #include -#endif #include #include diff --git a/src/Mod/CAM/App/AreaPyImp.cpp b/src/Mod/CAM/App/AreaPyImp.cpp index 8f5b9dc860..f07e00b509 100644 --- a/src/Mod/CAM/App/AreaPyImp.cpp +++ b/src/Mod/CAM/App/AreaPyImp.cpp @@ -20,7 +20,6 @@ * * ****************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/CAM/App/CMakeLists.txt b/src/Mod/CAM/App/CMakeLists.txt index 7706b27aa5..9b560b1e9a 100644 --- a/src/Mod/CAM/App/CMakeLists.txt +++ b/src/Mod/CAM/App/CMakeLists.txt @@ -42,7 +42,6 @@ SET(Python_SRCS SET(Mod_SRCS AppPath.cpp AppPathPy.cpp - PreCompiled.cpp PreCompiled.h ) @@ -128,9 +127,9 @@ endif() if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" Path_CPP_SRCS ${Path_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(Path PreCompiled.h PreCompiled.cpp Path_CPP_SRCS) + target_precompile_headers(Path PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) endif(FREECAD_USE_PCH) SET_BIN_DIR(Path PathApp /Mod/CAM) diff --git a/src/Mod/CAM/App/Command.cpp b/src/Mod/CAM/App/Command.cpp index 06d1e2bf96..1d5fded81b 100644 --- a/src/Mod/CAM/App/Command.cpp +++ b/src/Mod/CAM/App/Command.cpp @@ -20,12 +20,10 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif + #include #include diff --git a/src/Mod/CAM/App/CommandPyImp.cpp b/src/Mod/CAM/App/CommandPyImp.cpp index e0d0305e3e..1a8a0fdb6e 100644 --- a/src/Mod/CAM/App/CommandPyImp.cpp +++ b/src/Mod/CAM/App/CommandPyImp.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/CAM/App/FeatureArea.cpp b/src/Mod/CAM/App/FeatureArea.cpp index 280283ff41..0f9dd0d5fa 100644 --- a/src/Mod/CAM/App/FeatureArea.cpp +++ b/src/Mod/CAM/App/FeatureArea.cpp @@ -20,12 +20,10 @@ * * ****************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif + #include // for FC_LOG_LEVEL_INIT #include diff --git a/src/Mod/CAM/App/FeatureAreaPyImp.cpp b/src/Mod/CAM/App/FeatureAreaPyImp.cpp index 2ea4367722..7883bda177 100644 --- a/src/Mod/CAM/App/FeatureAreaPyImp.cpp +++ b/src/Mod/CAM/App/FeatureAreaPyImp.cpp @@ -20,7 +20,6 @@ * * ****************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/CAM/App/FeaturePath.cpp b/src/Mod/CAM/App/FeaturePath.cpp index ece51e94f3..d70cf4435e 100644 --- a/src/Mod/CAM/App/FeaturePath.cpp +++ b/src/Mod/CAM/App/FeaturePath.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/CAM/App/FeaturePathCompound.cpp b/src/Mod/CAM/App/FeaturePathCompound.cpp index e4c0019f52..6edb7fbfbd 100644 --- a/src/Mod/CAM/App/FeaturePathCompound.cpp +++ b/src/Mod/CAM/App/FeaturePathCompound.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "FeaturePathCompound.h" #include "Command.h" diff --git a/src/Mod/CAM/App/FeaturePathCompoundPyImp.cpp b/src/Mod/CAM/App/FeaturePathCompoundPyImp.cpp index 3aaa276e16..91e1036672 100644 --- a/src/Mod/CAM/App/FeaturePathCompoundPyImp.cpp +++ b/src/Mod/CAM/App/FeaturePathCompoundPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" // inclusion of the generated files (generated out of FeaturePathCompoundPy.xml) #include "FeaturePathCompoundPy.h" diff --git a/src/Mod/CAM/App/FeaturePathShape.cpp b/src/Mod/CAM/App/FeaturePathShape.cpp index 2940f5331e..9262040ab0 100644 --- a/src/Mod/CAM/App/FeaturePathShape.cpp +++ b/src/Mod/CAM/App/FeaturePathShape.cpp @@ -21,11 +21,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include "FeaturePathShape.h" diff --git a/src/Mod/CAM/App/Path.cpp b/src/Mod/CAM/App/Path.cpp index 17c11af0da..2459d60fcb 100644 --- a/src/Mod/CAM/App/Path.cpp +++ b/src/Mod/CAM/App/Path.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/CAM/App/PathPyImp.cpp b/src/Mod/CAM/App/PathPyImp.cpp index 869b6b3450..1760a4e5f6 100644 --- a/src/Mod/CAM/App/PathPyImp.cpp +++ b/src/Mod/CAM/App/PathPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "Base/GeometryPyCXX.h" diff --git a/src/Mod/CAM/App/PathSegmentWalker.cpp b/src/Mod/CAM/App/PathSegmentWalker.cpp index 4274d3281c..536b63ddc8 100644 --- a/src/Mod/CAM/App/PathSegmentWalker.cpp +++ b/src/Mod/CAM/App/PathSegmentWalker.cpp @@ -19,7 +19,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/Mod/CAM/App/PreCompiled.cpp b/src/Mod/CAM/App/PreCompiled.cpp deleted file mode 100644 index d2fde1ef7a..0000000000 --- a/src/Mod/CAM/App/PreCompiled.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2014 Yorik van Havre * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" diff --git a/src/Mod/CAM/App/PreCompiled.h b/src/Mod/CAM/App/PreCompiled.h index 65baf02e78..4336d9cd99 100644 --- a/src/Mod/CAM/App/PreCompiled.h +++ b/src/Mod/CAM/App/PreCompiled.h @@ -25,19 +25,6 @@ #include -// Exporting of App classes -#ifdef FC_OS_WIN32 -#define PathExport __declspec(dllexport) -// # define RobotExport __declspec(dllexport) uncomment this to use KDL -#define PartExport __declspec(dllimport) -#else // for Linux -#define PathExport -// # define RobotExport uncomment this to use KDL -#define PartExport -#endif - -#ifdef _PreComp_ - // standard #include #include @@ -97,5 +84,4 @@ #include #include -#endif // _PreComp_ #endif diff --git a/src/Mod/CAM/App/PropertyPath.cpp b/src/Mod/CAM/App/PropertyPath.cpp index c27f05ec7d..3473cb86fe 100644 --- a/src/Mod/CAM/App/PropertyPath.cpp +++ b/src/Mod/CAM/App/PropertyPath.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/CAM/App/Voronoi.cpp b/src/Mod/CAM/App/Voronoi.cpp index 1f840559f7..f2ced26f46 100644 --- a/src/Mod/CAM/App/Voronoi.cpp +++ b/src/Mod/CAM/App/Voronoi.cpp @@ -20,10 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ -#endif - #include #include diff --git a/src/Mod/CAM/App/VoronoiCell.cpp b/src/Mod/CAM/App/VoronoiCell.cpp index 42e267ec6e..3461830c25 100644 --- a/src/Mod/CAM/App/VoronoiCell.cpp +++ b/src/Mod/CAM/App/VoronoiCell.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "VoronoiCell.h" diff --git a/src/Mod/CAM/App/VoronoiCellPyImp.cpp b/src/Mod/CAM/App/VoronoiCellPyImp.cpp index 24316910c7..c11ffac205 100644 --- a/src/Mod/CAM/App/VoronoiCellPyImp.cpp +++ b/src/Mod/CAM/App/VoronoiCellPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "Base/Vector3D.h" #include "Base/VectorPy.h" diff --git a/src/Mod/CAM/App/VoronoiEdge.cpp b/src/Mod/CAM/App/VoronoiEdge.cpp index 343633c59d..06041335b1 100644 --- a/src/Mod/CAM/App/VoronoiEdge.cpp +++ b/src/Mod/CAM/App/VoronoiEdge.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "VoronoiEdge.h" diff --git a/src/Mod/CAM/App/VoronoiEdgePyImp.cpp b/src/Mod/CAM/App/VoronoiEdgePyImp.cpp index bece8ba9fc..cfbd56fdcd 100644 --- a/src/Mod/CAM/App/VoronoiEdgePyImp.cpp +++ b/src/Mod/CAM/App/VoronoiEdgePyImp.cpp @@ -20,12 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include + #include #include -#endif + #include "Mod/Part/App/Geometry.h" #include "Mod/Part/App/TopoShapeEdgePy.h" diff --git a/src/Mod/CAM/App/VoronoiPyImp.cpp b/src/Mod/CAM/App/VoronoiPyImp.cpp index d2486ecec9..340b4bee66 100644 --- a/src/Mod/CAM/App/VoronoiPyImp.cpp +++ b/src/Mod/CAM/App/VoronoiPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "Base/GeometryPyCXX.h" #include "Base/Vector3D.h" diff --git a/src/Mod/CAM/App/VoronoiVertex.cpp b/src/Mod/CAM/App/VoronoiVertex.cpp index 1f6c226972..fa2a9167b3 100644 --- a/src/Mod/CAM/App/VoronoiVertex.cpp +++ b/src/Mod/CAM/App/VoronoiVertex.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "VoronoiVertex.h" diff --git a/src/Mod/CAM/App/VoronoiVertexPyImp.cpp b/src/Mod/CAM/App/VoronoiVertexPyImp.cpp index eae8e07bb9..44a5ad9161 100644 --- a/src/Mod/CAM/App/VoronoiVertexPyImp.cpp +++ b/src/Mod/CAM/App/VoronoiVertexPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "Base/Vector3D.h" #include "Base/VectorPy.h" diff --git a/src/Mod/CAM/Gui/AppPathGui.cpp b/src/Mod/CAM/Gui/AppPathGui.cpp index 2dd45cb5ec..6a1d1eac52 100644 --- a/src/Mod/CAM/Gui/AppPathGui.cpp +++ b/src/Mod/CAM/Gui/AppPathGui.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/CAM/Gui/AppPathGuiPy.cpp b/src/Mod/CAM/Gui/AppPathGuiPy.cpp index 6c68254a2c..62b580c91b 100644 --- a/src/Mod/CAM/Gui/AppPathGuiPy.cpp +++ b/src/Mod/CAM/Gui/AppPathGuiPy.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/CAM/Gui/CMakeLists.txt b/src/Mod/CAM/Gui/CMakeLists.txt index f3e6e00bbb..2ae98c6421 100644 --- a/src/Mod/CAM/Gui/CMakeLists.txt +++ b/src/Mod/CAM/Gui/CMakeLists.txt @@ -24,7 +24,6 @@ SET(PathGui_SRCS_Module AppPathGui.cpp AppPathGuiPy.cpp Resources/Path.qrc - PreCompiled.cpp PreCompiled.h DlgSettingsPathColor.ui DlgSettingsPathColor.cpp @@ -59,17 +58,18 @@ SET(PathGui_SRCS ${PathGui_SRCS_ViewProvider} ) -if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${PathGui_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(PathGui PreCompiled.h PreCompiled.cpp PCH_SRCS) -endif(FREECAD_USE_PCH) - SET(PathGuiIcon_SVG Resources/icons/CAMWorkbench.svg ) add_library(PathGui SHARED ${PathGui_SRCS} ${PathGuiIcon_SVG}) + +if(FREECAD_USE_PCH) + target_precompile_headers(PathGui PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_include_directories( PathGui PRIVATE diff --git a/src/Mod/CAM/Gui/Command.cpp b/src/Mod/CAM/Gui/Command.cpp index da677ccc58..06abdd2bf6 100644 --- a/src/Mod/CAM/Gui/Command.cpp +++ b/src/Mod/CAM/Gui/Command.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/CAM/Gui/DlgProcessorChooser.cpp b/src/Mod/CAM/Gui/DlgProcessorChooser.cpp index 05a99c69be..f4684ab297 100644 --- a/src/Mod/CAM/Gui/DlgProcessorChooser.cpp +++ b/src/Mod/CAM/Gui/DlgProcessorChooser.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include diff --git a/src/Mod/CAM/Gui/DlgSettingsPathColor.cpp b/src/Mod/CAM/Gui/DlgSettingsPathColor.cpp index 68f04e3c67..76037ec846 100644 --- a/src/Mod/CAM/Gui/DlgSettingsPathColor.cpp +++ b/src/Mod/CAM/Gui/DlgSettingsPathColor.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "DlgSettingsPathColor.h" #include "ui_DlgSettingsPathColor.h" diff --git a/src/Mod/CAM/Gui/PreCompiled.cpp b/src/Mod/CAM/Gui/PreCompiled.cpp deleted file mode 100644 index 83f92c7f12..0000000000 --- a/src/Mod/CAM/Gui/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2014 Yorik van Havre * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/CAM/Gui/PreCompiled.h b/src/Mod/CAM/Gui/PreCompiled.h index 1de6e791cf..af4fb51edb 100644 --- a/src/Mod/CAM/Gui/PreCompiled.h +++ b/src/Mod/CAM/Gui/PreCompiled.h @@ -25,21 +25,6 @@ #include -// Importing of App classes -#ifdef FC_OS_WIN32 -#define PartExport __declspec(dllimport) -#define PathExport __declspec(dllimport) -#define PartGuiExport __declspec(dllexport) -#define PathGuiExport __declspec(dllexport) -#else // for Linux -#define PartExport -#define PathExport -#define PartGuiExport -#define PathGuiExport -#endif - -#ifdef _PreComp_ - // boost #include @@ -65,6 +50,4 @@ #include #include -#endif //_PreComp_ - #endif // PATHGUI_PRECOMPILED_H diff --git a/src/Mod/CAM/Gui/TaskDlgPathCompound.cpp b/src/Mod/CAM/Gui/TaskDlgPathCompound.cpp index 247999ac71..e034a28261 100644 --- a/src/Mod/CAM/Gui/TaskDlgPathCompound.cpp +++ b/src/Mod/CAM/Gui/TaskDlgPathCompound.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/CAM/Gui/ViewProviderArea.cpp b/src/Mod/CAM/Gui/ViewProviderArea.cpp index 146b60e4af..b086e69a4b 100644 --- a/src/Mod/CAM/Gui/ViewProviderArea.cpp +++ b/src/Mod/CAM/Gui/ViewProviderArea.cpp @@ -20,7 +20,6 @@ * * ****************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/CAM/Gui/ViewProviderPath.cpp b/src/Mod/CAM/Gui/ViewProviderPath.cpp index b2c435dc1f..aec61ccdbe 100644 --- a/src/Mod/CAM/Gui/ViewProviderPath.cpp +++ b/src/Mod/CAM/Gui/ViewProviderPath.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ #include #include @@ -37,7 +34,6 @@ #include #include #include -#endif #include #include diff --git a/src/Mod/CAM/Gui/ViewProviderPathCompound.cpp b/src/Mod/CAM/Gui/ViewProviderPathCompound.cpp index e9be343f69..be8e801804 100644 --- a/src/Mod/CAM/Gui/ViewProviderPathCompound.cpp +++ b/src/Mod/CAM/Gui/ViewProviderPathCompound.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/CAM/Gui/ViewProviderPathShape.cpp b/src/Mod/CAM/Gui/ViewProviderPathShape.cpp index 100c97501a..7ad00a2d94 100644 --- a/src/Mod/CAM/Gui/ViewProviderPathShape.cpp +++ b/src/Mod/CAM/Gui/ViewProviderPathShape.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/CAM/PathSimulator/App/AppPathSimulator.cpp b/src/Mod/CAM/PathSimulator/App/AppPathSimulator.cpp index de91800d12..8b3b98aba0 100644 --- a/src/Mod/CAM/PathSimulator/App/AppPathSimulator.cpp +++ b/src/Mod/CAM/PathSimulator/App/AppPathSimulator.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/CAM/PathSimulator/App/CMakeLists.txt b/src/Mod/CAM/PathSimulator/App/CMakeLists.txt index 91e425577e..921106ce39 100644 --- a/src/Mod/CAM/PathSimulator/App/CMakeLists.txt +++ b/src/Mod/CAM/PathSimulator/App/CMakeLists.txt @@ -18,7 +18,6 @@ SET(PathSimulator_SRCS PathSim.h VolSim.cpp VolSim.h - PreCompiled.cpp PreCompiled.h ${Python_SRCS} ) diff --git a/src/Mod/CAM/PathSimulator/App/PathSim.cpp b/src/Mod/CAM/PathSimulator/App/PathSim.cpp index efc53a98f4..1032ec6204 100644 --- a/src/Mod/CAM/PathSimulator/App/PathSim.cpp +++ b/src/Mod/CAM/PathSimulator/App/PathSim.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "PathSim.h" diff --git a/src/Mod/CAM/PathSimulator/App/PathSimPyImp.cpp b/src/Mod/CAM/PathSimulator/App/PathSimPyImp.cpp index 631e6dc4e6..a3417038b4 100644 --- a/src/Mod/CAM/PathSimulator/App/PathSimPyImp.cpp +++ b/src/Mod/CAM/PathSimulator/App/PathSimPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/CAM/PathSimulator/App/PreCompiled.cpp b/src/Mod/CAM/PathSimulator/App/PreCompiled.cpp deleted file mode 100644 index 9dc04433fe..0000000000 --- a/src/Mod/CAM/PathSimulator/App/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2017 Shai Seger * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/CAM/PathSimulator/App/PreCompiled.h b/src/Mod/CAM/PathSimulator/App/PreCompiled.h index 870535dc66..63cc1531a8 100644 --- a/src/Mod/CAM/PathSimulator/App/PreCompiled.h +++ b/src/Mod/CAM/PathSimulator/App/PreCompiled.h @@ -25,7 +25,6 @@ #include -#ifdef _PreComp_ // standard #include @@ -50,6 +49,4 @@ // Xerces #include -#endif //_PreComp_ - #endif diff --git a/src/Mod/CAM/PathSimulator/App/VolSim.cpp b/src/Mod/CAM/PathSimulator/App/VolSim.cpp index 7a70749b6c..053bd2b19e 100644 --- a/src/Mod/CAM/PathSimulator/App/VolSim.cpp +++ b/src/Mod/CAM/PathSimulator/App/VolSim.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Mod/CAM/PathSimulator/AppGL/AppCAMSimulator.cpp b/src/Mod/CAM/PathSimulator/AppGL/AppCAMSimulator.cpp index c50b397d52..14b5db42e0 100644 --- a/src/Mod/CAM/PathSimulator/AppGL/AppCAMSimulator.cpp +++ b/src/Mod/CAM/PathSimulator/AppGL/AppCAMSimulator.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/CAM/PathSimulator/AppGL/CAMSim.cpp b/src/Mod/CAM/PathSimulator/AppGL/CAMSim.cpp index b6d04af20b..d4d0b15e1d 100644 --- a/src/Mod/CAM/PathSimulator/AppGL/CAMSim.cpp +++ b/src/Mod/CAM/PathSimulator/AppGL/CAMSim.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" // NOLINT -#ifndef _PreComp_ #include #include -#endif + #include "CAMSim.h" #include "DlgCAMSimulator.h" diff --git a/src/Mod/CAM/PathSimulator/AppGL/CAMSimPyImp.cpp b/src/Mod/CAM/PathSimulator/AppGL/CAMSimPyImp.cpp index 7ee0eea34b..3362ff98c0 100644 --- a/src/Mod/CAM/PathSimulator/AppGL/CAMSimPyImp.cpp +++ b/src/Mod/CAM/PathSimulator/AppGL/CAMSimPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/CAM/PathSimulator/AppGL/CMakeLists.txt b/src/Mod/CAM/PathSimulator/AppGL/CMakeLists.txt index 78a282fc26..927f386556 100644 --- a/src/Mod/CAM/PathSimulator/AppGL/CMakeLists.txt +++ b/src/Mod/CAM/PathSimulator/AppGL/CMakeLists.txt @@ -22,7 +22,6 @@ SET(CAMSimulator_SRCS_Module CAMSimPyImp.cpp DlgCAMSimulator.cpp DlgCAMSimulator.h - PreCompiled.cpp PreCompiled.h ) @@ -76,12 +75,6 @@ SET(CAMSimulator_SRCS ${CAMSimulator_SRCS_Core} ) -if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${CAMSimulator_SRCS_precomp}) - ADD_MSVC_PRECOMPILED_HEADER(CAMSimulator PreCompiled.h PreCompiled.cpp PCH_SRCS) -endif(FREECAD_USE_PCH) - add_library(CAMSimulator SHARED ${CAMSimulator_SRCS}) target_include_directories( CAMSimulator @@ -92,6 +85,14 @@ target_include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) target_link_libraries(CAMSimulator ${CAMSimulator_LIBS}) + +if(FREECAD_USE_PCH) + target_precompile_headers(CAMSimulator PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) + set_source_files_properties(${CAMSimulator_SRCS_Core} PROPERTIES SKIP_PRECOMPILE_HEADERS TRUE) +endif(FREECAD_USE_PCH) + if (FREECAD_WARN_ERROR) target_compile_warn_error(CAMSimulator) endif() diff --git a/src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.cpp b/src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.cpp index 050f97f1a6..6069bcc04b 100644 --- a/src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.cpp +++ b/src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "DlgCAMSimulator.h" #include "MillSimulation.h" diff --git a/src/Mod/CAM/PathSimulator/AppGL/PreCompiled.cpp b/src/Mod/CAM/PathSimulator/AppGL/PreCompiled.cpp deleted file mode 100644 index 9dc04433fe..0000000000 --- a/src/Mod/CAM/PathSimulator/AppGL/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2017 Shai Seger * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/CAM/PathSimulator/AppGL/PreCompiled.h b/src/Mod/CAM/PathSimulator/AppGL/PreCompiled.h index f3f9e92376..12cbf4ea18 100644 --- a/src/Mod/CAM/PathSimulator/AppGL/PreCompiled.h +++ b/src/Mod/CAM/PathSimulator/AppGL/PreCompiled.h @@ -25,8 +25,6 @@ #include -#ifdef _PreComp_ - // standard #include #include @@ -50,6 +48,4 @@ // Xerces #include -#endif //_PreComp_ - #endif From 2150afc47066ef10003b192cc558df18531db418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Tue, 23 Sep 2025 19:29:13 +0200 Subject: [PATCH 15/17] Sandbox: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- src/Mod/Sandbox/App/AppSandbox.cpp | 4 +--- src/Mod/Sandbox/App/CMakeLists.txt | 7 +++++- src/Mod/Sandbox/App/DocumentProtector.cpp | 4 +--- src/Mod/Sandbox/App/DocumentProtectorPy.cpp | 4 +--- src/Mod/Sandbox/App/DocumentThread.cpp | 4 +--- src/Mod/Sandbox/App/PreCompiled.cpp | 24 --------------------- src/Mod/Sandbox/App/PreCompiled.h | 13 ----------- src/Mod/Sandbox/Gui/AppSandboxGui.cpp | 4 +--- src/Mod/Sandbox/Gui/CMakeLists.txt | 8 ++++++- src/Mod/Sandbox/Gui/Command.cpp | 4 +--- src/Mod/Sandbox/Gui/GLGraphicsView.cpp | 5 ----- src/Mod/Sandbox/Gui/Overlay.cpp | 4 +--- src/Mod/Sandbox/Gui/PreCompiled.cpp | 24 --------------------- src/Mod/Sandbox/Gui/PreCompiled.h | 21 +----------------- src/Mod/Sandbox/Gui/TaskPanelView.cpp | 1 - src/Mod/Sandbox/Gui/Workbench.cpp | 4 +--- 16 files changed, 22 insertions(+), 113 deletions(-) delete mode 100644 src/Mod/Sandbox/App/PreCompiled.cpp delete mode 100644 src/Mod/Sandbox/Gui/PreCompiled.cpp diff --git a/src/Mod/Sandbox/App/AppSandbox.cpp b/src/Mod/Sandbox/App/AppSandbox.cpp index f74381bb60..a333303e3c 100644 --- a/src/Mod/Sandbox/App/AppSandbox.cpp +++ b/src/Mod/Sandbox/App/AppSandbox.cpp @@ -21,10 +21,8 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include #include diff --git a/src/Mod/Sandbox/App/CMakeLists.txt b/src/Mod/Sandbox/App/CMakeLists.txt index 316faed310..eced5e020f 100644 --- a/src/Mod/Sandbox/App/CMakeLists.txt +++ b/src/Mod/Sandbox/App/CMakeLists.txt @@ -32,7 +32,6 @@ SET(Sandbox_SRCS DocumentProtectorPy.h DocumentThread.cpp DocumentThread.h - PreCompiled.cpp PreCompiled.h ) @@ -45,6 +44,12 @@ add_library(Sandbox SHARED ${Sandbox_SRCS} ${Sandbox_Scripts}) target_link_libraries(Sandbox ${Sandbox_LIBS}) +if(FREECAD_USE_PCH) + target_precompile_headers(Sandbox PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + fc_target_copy_resource_flat(Sandbox ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/Mod/Sandbox diff --git a/src/Mod/Sandbox/App/DocumentProtector.cpp b/src/Mod/Sandbox/App/DocumentProtector.cpp index d1ba0f11c7..e79a0e4c76 100644 --- a/src/Mod/Sandbox/App/DocumentProtector.cpp +++ b/src/Mod/Sandbox/App/DocumentProtector.cpp @@ -21,8 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -31,7 +29,7 @@ # include # include # include -#endif + #include "DocumentProtector.h" diff --git a/src/Mod/Sandbox/App/DocumentProtectorPy.cpp b/src/Mod/Sandbox/App/DocumentProtectorPy.cpp index 0c19900e6b..5424d49fc2 100644 --- a/src/Mod/Sandbox/App/DocumentProtectorPy.cpp +++ b/src/Mod/Sandbox/App/DocumentProtectorPy.cpp @@ -21,10 +21,8 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include "DocumentProtectorPy.h" #include "DocumentProtector.h" diff --git a/src/Mod/Sandbox/App/DocumentThread.cpp b/src/Mod/Sandbox/App/DocumentThread.cpp index f3756d8df5..85ee8df15e 100644 --- a/src/Mod/Sandbox/App/DocumentThread.cpp +++ b/src/Mod/Sandbox/App/DocumentThread.cpp @@ -21,10 +21,8 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include "DocumentThread.h" #include "DocumentProtector.h" diff --git a/src/Mod/Sandbox/App/PreCompiled.cpp b/src/Mod/Sandbox/App/PreCompiled.cpp deleted file mode 100644 index c5bd521220..0000000000 --- a/src/Mod/Sandbox/App/PreCompiled.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2009 Werner Mayer * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" diff --git a/src/Mod/Sandbox/App/PreCompiled.h b/src/Mod/Sandbox/App/PreCompiled.h index 4c93443354..f171e895f4 100644 --- a/src/Mod/Sandbox/App/PreCompiled.h +++ b/src/Mod/Sandbox/App/PreCompiled.h @@ -26,17 +26,6 @@ #include -// Exporting of App classes -#ifdef FC_OS_WIN32 -# define SandboxAppExport __declspec(dllexport) -# define MeshExport __declspec(dllimport) -#else // for Linux -# define SandboxAppExport -# define MeshExport -#endif - -#ifdef _PreComp_ - // standard #include #include @@ -67,7 +56,5 @@ #include #include -#endif //_PreComp_ - #endif diff --git a/src/Mod/Sandbox/Gui/AppSandboxGui.cpp b/src/Mod/Sandbox/Gui/AppSandboxGui.cpp index b8f8f8b9c7..ec162b1cae 100644 --- a/src/Mod/Sandbox/Gui/AppSandboxGui.cpp +++ b/src/Mod/Sandbox/Gui/AppSandboxGui.cpp @@ -21,14 +21,12 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/Sandbox/Gui/CMakeLists.txt b/src/Mod/Sandbox/Gui/CMakeLists.txt index a1c259387c..797b102004 100644 --- a/src/Mod/Sandbox/Gui/CMakeLists.txt +++ b/src/Mod/Sandbox/Gui/CMakeLists.txt @@ -1,5 +1,6 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src/Gui ) @@ -42,7 +43,6 @@ SET(SandboxGui_SRCS GLGraphicsView.h Overlay.cpp Overlay.h - PreCompiled.cpp PreCompiled.h TaskPanelView.cpp TaskPanelView.h @@ -62,6 +62,12 @@ if (MSVC) endif() +if(FREECAD_USE_PCH) + target_precompile_headers(SandboxGui PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + fc_target_copy_resource_flat(SandboxGui ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/Mod/Sandbox diff --git a/src/Mod/Sandbox/Gui/Command.cpp b/src/Mod/Sandbox/Gui/Command.cpp index 2c6e411ff1..7e08302ea6 100644 --- a/src/Mod/Sandbox/Gui/Command.cpp +++ b/src/Mod/Sandbox/Gui/Command.cpp @@ -20,9 +20,8 @@ * * ***************************************************************************/ +#include -#include "PreCompiled.h" -#ifndef _PreComp_ # ifdef FC_OS_WIN32 # include # endif @@ -55,7 +54,6 @@ # include # include # include -#endif #include #include diff --git a/src/Mod/Sandbox/Gui/GLGraphicsView.cpp b/src/Mod/Sandbox/Gui/GLGraphicsView.cpp index 316dc31aa0..b0f0e2e87f 100644 --- a/src/Mod/Sandbox/Gui/GLGraphicsView.cpp +++ b/src/Mod/Sandbox/Gui/GLGraphicsView.cpp @@ -21,11 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ -#endif - #include #include #include diff --git a/src/Mod/Sandbox/Gui/Overlay.cpp b/src/Mod/Sandbox/Gui/Overlay.cpp index a41b128e61..0ba775a86a 100644 --- a/src/Mod/Sandbox/Gui/Overlay.cpp +++ b/src/Mod/Sandbox/Gui/Overlay.cpp @@ -21,14 +21,12 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include # include # include -#endif + #include #include diff --git a/src/Mod/Sandbox/Gui/PreCompiled.cpp b/src/Mod/Sandbox/Gui/PreCompiled.cpp deleted file mode 100644 index e6f3cb12fc..0000000000 --- a/src/Mod/Sandbox/Gui/PreCompiled.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2009 Werner Mayer * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" diff --git a/src/Mod/Sandbox/Gui/PreCompiled.h b/src/Mod/Sandbox/Gui/PreCompiled.h index 82ad54f308..55687cfe92 100644 --- a/src/Mod/Sandbox/Gui/PreCompiled.h +++ b/src/Mod/Sandbox/Gui/PreCompiled.h @@ -26,23 +26,6 @@ #include -// Importing of App classes -#ifdef FC_OS_WIN32 -# define SandboxAppExport __declspec(dllimport) -# define SandboxGuiExport __declspec(dllexport) -# define MeshExport __declspec(dllimport) -# define PartExport __declspec(dllimport) -# define AppPartExport __declspec(dllimport) -#else // for Linux -# define SandboxAppExport -# define SandboxGuiExport -# define MeshExport -# define PartExport -# define AppPartExport -#endif - -#ifdef _PreComp_ - // standard #include #include @@ -72,6 +55,4 @@ #include #include -#endif //_PreComp_ - -#endif // GUI_PRECOMPILED_H +#endif // GUI_PRECOMPILED_H diff --git a/src/Mod/Sandbox/Gui/TaskPanelView.cpp b/src/Mod/Sandbox/Gui/TaskPanelView.cpp index 659a89be77..e5910fe497 100644 --- a/src/Mod/Sandbox/Gui/TaskPanelView.cpp +++ b/src/Mod/Sandbox/Gui/TaskPanelView.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" /// Here the FreeCAD includes sorted by Base,App,Gui...... diff --git a/src/Mod/Sandbox/Gui/Workbench.cpp b/src/Mod/Sandbox/Gui/Workbench.cpp index 2041262465..1bb158c500 100644 --- a/src/Mod/Sandbox/Gui/Workbench.cpp +++ b/src/Mod/Sandbox/Gui/Workbench.cpp @@ -21,9 +21,7 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include # include # include @@ -32,7 +30,7 @@ # include # include # include -#endif + #include "Workbench.h" #include From abc6b9e7d06b360e47c0d878bd231a1faeff2be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Tue, 23 Sep 2025 21:47:27 +0200 Subject: [PATCH 16/17] Test: use CMake to generate precompiled headers on all platforms "Professional CMake" book suggest the following: "Targets should build successfully with or without compiler support for precompiled headers. It should be considered an optimization, not a requirement. In particular, do not explicitly include a precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically generated precompile header on the compiler command line instead. This is more portable across the major compilers and is likely to be easier to maintain. It will also avoid warnings being generated from certain code checking tools like iwyu (include what you use)." Therefore, removed the "#include " from sources, also there is no need for the "#ifdef _PreComp_" anymore --- src/Mod/Test/Gui/AppTestGui.cpp | 1 - src/Mod/Test/Gui/CMakeLists.txt | 13 ++++++------- src/Mod/Test/Gui/PreCompiled.cpp | 23 ----------------------- src/Mod/Test/Gui/PreCompiled.h | 6 +----- src/Mod/Test/Gui/UnitTestImp.cpp | 4 +--- src/Mod/Test/Gui/UnitTestPy.cpp | 4 +--- 6 files changed, 9 insertions(+), 42 deletions(-) delete mode 100644 src/Mod/Test/Gui/PreCompiled.cpp diff --git a/src/Mod/Test/Gui/AppTestGui.cpp b/src/Mod/Test/Gui/AppTestGui.cpp index 93e977087f..12810e5dcd 100644 --- a/src/Mod/Test/Gui/AppTestGui.cpp +++ b/src/Mod/Test/Gui/AppTestGui.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/Mod/Test/Gui/CMakeLists.txt b/src/Mod/Test/Gui/CMakeLists.txt index dbc3a9d6ef..240c645f69 100644 --- a/src/Mod/Test/Gui/CMakeLists.txt +++ b/src/Mod/Test/Gui/CMakeLists.txt @@ -32,7 +32,6 @@ SET(TestGui_SRCS ${Dialogs_SRCS} ${Resource_SRCS} AppTestGui.cpp - PreCompiled.cpp PreCompiled.h ) SET(TestGuiPy_SRCS @@ -43,14 +42,14 @@ SET(TestGuiIcon_SVG Resources/icons/TestWorkbench.svg ) -if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${TestGui_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(QtUnitGui PreCompiled.h PreCompiled.cpp PCH_SRCS) -endif(FREECAD_USE_PCH) - add_library(QtUnitGui SHARED ${TestGui_SRCS} ${TestGuiPy_SRCS} ${TestGuiIcon_SVG}) +if(FREECAD_USE_PCH) + target_precompile_headers(QtUnitGui PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + target_include_directories( QtUnitGui PRIVATE diff --git a/src/Mod/Test/Gui/PreCompiled.cpp b/src/Mod/Test/Gui/PreCompiled.cpp deleted file mode 100644 index 01419be663..0000000000 --- a/src/Mod/Test/Gui/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2006 Werner Mayer * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/Test/Gui/PreCompiled.h b/src/Mod/Test/Gui/PreCompiled.h index b88a01c6ed..b9024a2dd3 100644 --- a/src/Mod/Test/Gui/PreCompiled.h +++ b/src/Mod/Test/Gui/PreCompiled.h @@ -25,13 +25,9 @@ #include -#ifdef _PreComp_ - // Qt Toolkit #include #include #include -#endif //_PreComp_ - -#endif // __PRECOMPILED_GUI__ +#endif // TEST_GUI_PRECOMPILED_H diff --git a/src/Mod/Test/Gui/UnitTestImp.cpp b/src/Mod/Test/Gui/UnitTestImp.cpp index 39e7891689..f021d62e35 100644 --- a/src/Mod/Test/Gui/UnitTestImp.cpp +++ b/src/Mod/Test/Gui/UnitTestImp.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include #include diff --git a/src/Mod/Test/Gui/UnitTestPy.cpp b/src/Mod/Test/Gui/UnitTestPy.cpp index f2ec12814c..b8d98422ba 100644 --- a/src/Mod/Test/Gui/UnitTestPy.cpp +++ b/src/Mod/Test/Gui/UnitTestPy.cpp @@ -20,11 +20,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif + #include From 2ce0323b8ffb38dc32d8c640e4ad4d4914b25e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sat, 23 Aug 2025 13:40:22 +0200 Subject: [PATCH 17/17] cleanup remaining implementations of precompiled headers --- cMake/FreeCadMacros.cmake | 41 ------------------- src/3rdParty/PyCXX/CXX/WrapPython.h | 2 + src/Main/MainCmd.cpp | 4 -- src/Main/MainGui.cpp | 4 -- src/Main/MainPy.cpp | 4 -- src/Mod/Material/App/Exceptions.cpp | 2 +- ...SketcherTransformationExpressionHelper.cpp | 2 - src/Tools/_TEMPLATE_/App/App_TEMPLATE_.cpp | 4 +- src/Tools/_TEMPLATE_/App/CMakeLists.txt | 1 - src/Tools/_TEMPLATE_/App/PreCompiled.cpp | 24 ----------- src/Tools/_TEMPLATE_/App/PreCompiled.h | 4 -- src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_Gui.cpp | 4 +- src/Tools/_TEMPLATE_/Gui/CMakeLists.txt | 1 - src/Tools/_TEMPLATE_/Gui/Command.cpp | 5 --- src/Tools/_TEMPLATE_/Gui/PreCompiled.cpp | 24 ----------- src/Tools/_TEMPLATE_/Gui/PreCompiled.h | 4 -- src/Tools/_TEMPLATE_/Gui/Workbench.cpp | 6 --- .../bindings/templates/templateCPPFile.py | 1 - .../templates/templateClassPyExport.py | 1 - .../templates/templateModuleAppFeature.py | 2 - .../templates/templateModuleAppMain.py | 4 +- src/Tools/embedded/Qt/cxx/plugin.cpp | 1 - src/Tools/params_utils.py | 3 +- 23 files changed, 7 insertions(+), 141 deletions(-) delete mode 100644 src/Tools/_TEMPLATE_/App/PreCompiled.cpp delete mode 100644 src/Tools/_TEMPLATE_/Gui/PreCompiled.cpp diff --git a/cMake/FreeCadMacros.cmake b/cMake/FreeCadMacros.cmake index 0eac3ddcad..e6af82f2eb 100644 --- a/cMake/FreeCadMacros.cmake +++ b/cMake/FreeCadMacros.cmake @@ -211,47 +211,6 @@ macro(generate_from_any INPUT_FILE OUTPUT_FILE VARIABLE) endmacro(generate_from_any) - -MACRO(ADD_MSVC_PRECOMPILED_HEADER TargetName PrecompiledHeader PrecompiledSource SourcesVar) - IF(MSVC) - GET_FILENAME_COMPONENT(PrecompiledBasename ${PrecompiledHeader} NAME_WE) - IF(MSVC_IDE) - SET(PrecompiledBinary "$(IntDir)\\$(TargetName).pch") - ELSE(MSVC_IDE) - SET(PrecompiledBinary ${CMAKE_CURRENT_BINARY_DIR}/${TargetName}.pch) - ENDIF(MSVC_IDE) - SET(Sources ${${SourcesVar}}) - - SET_SOURCE_FILES_PROPERTIES(${PrecompiledSource} - PROPERTIES COMPILE_FLAGS "/Yc\"${PrecompiledHeader}\" /Fp\"${PrecompiledBinary}\"" - OBJECT_OUTPUTS "${PrecompiledBinary}") - SET_SOURCE_FILES_PROPERTIES(${Sources} - PROPERTIES COMPILE_FLAGS "/Yu\"${PrecompiledHeader}\" /FI\"${PrecompiledBinary}\" /Fp\"${PrecompiledBinary}\"" - OBJECT_DEPENDS "${PrecompiledBinary}") - # Add precompiled header to SourcesVar - LIST(APPEND ${SourcesVar} ${PrecompiledSource}) - ENDIF(MSVC) -ENDMACRO(ADD_MSVC_PRECOMPILED_HEADER) - -MACRO(GET_MSVC_PRECOMPILED_SOURCE PrecompiledSource SourcesVar) - IF(MSVC) - FOREACH (it ${ARGN}) - GET_FILENAME_COMPONENT(file_ext ${it} EXT) - GET_FILENAME_COMPONENT(file_name ${it} NAME) - STRING(COMPARE EQUAL ${it} ${PrecompiledSource} pch) - IF (NOT pch) - # get c++ source files - STRING(REGEX MATCH "^(.cpp|.cc|.cxx)$" cpp_file ${file_ext}) - # ignore any generated source files from Qt - STRING(REGEX MATCH "^(moc_|qrc_|ui_)" gen_file ${file_name}) - IF(cpp_file AND NOT gen_file) - LIST(APPEND ${SourcesVar} ${it}) - ENDIF(cpp_file AND NOT gen_file) - ENDIF(NOT pch) - ENDFOREACH (it) - ENDIF(MSVC) -ENDMACRO(GET_MSVC_PRECOMPILED_SOURCE) - # Macro to replace all the binary output locations. Takes 2 optional parameters. # ${ARGVN} is zero based so the 3rd element is ${ARGV2}. When the 3rd element is missing, # Runtime and Lib directories default to /bin and /lib. When present, the 3rd element diff --git a/src/3rdParty/PyCXX/CXX/WrapPython.h b/src/3rdParty/PyCXX/CXX/WrapPython.h index 00e5b966b5..0bec53a3fa 100644 --- a/src/3rdParty/PyCXX/CXX/WrapPython.h +++ b/src/3rdParty/PyCXX/CXX/WrapPython.h @@ -38,6 +38,8 @@ #ifndef __PyCXX_wrap_python_hxx__ #define __PyCXX_wrap_python_hxx__ +#include + // On some platforms we have to include time.h to get select defined #if !defined(__WIN32__) && !defined(WIN32) && !defined(_WIN32) && !defined(_WIN64) #include diff --git a/src/Main/MainCmd.cpp b/src/Main/MainCmd.cpp index dfe29dd109..f4c043456f 100644 --- a/src/Main/MainCmd.cpp +++ b/src/Main/MainCmd.cpp @@ -23,10 +23,6 @@ #include "../FCConfig.h" -#ifdef _PreComp_ -#undef _PreComp_ -#endif - #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H diff --git a/src/Main/MainGui.cpp b/src/Main/MainGui.cpp index 850f99d787..ae11c0f70f 100644 --- a/src/Main/MainGui.cpp +++ b/src/Main/MainGui.cpp @@ -28,10 +28,6 @@ #include #endif -#ifdef _PreComp_ -#undef _PreComp_ -#endif - #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H diff --git a/src/Main/MainPy.cpp b/src/Main/MainPy.cpp index 82d00e7d18..9352f1c7a3 100644 --- a/src/Main/MainPy.cpp +++ b/src/Main/MainPy.cpp @@ -23,10 +23,6 @@ #include -#ifdef _PreComp_ -#undef _PreComp_ -#endif - #if defined(FC_OS_WIN32) #include #endif diff --git a/src/Mod/Material/App/Exceptions.cpp b/src/Mod/Material/App/Exceptions.cpp index 069538a9e3..54f93e3972 100644 --- a/src/Mod/Material/App/Exceptions.cpp +++ b/src/Mod/Material/App/Exceptions.cpp @@ -18,7 +18,7 @@ * . * * * **************************************************************************/ -#include "PreCompiled.h" + #include "Exceptions.h" namespace Materials diff --git a/src/Mod/Sketcher/Gui/SketcherTransformationExpressionHelper.cpp b/src/Mod/Sketcher/Gui/SketcherTransformationExpressionHelper.cpp index 34815a3fd9..9fda4f7821 100644 --- a/src/Mod/Sketcher/Gui/SketcherTransformationExpressionHelper.cpp +++ b/src/Mod/Sketcher/Gui/SketcherTransformationExpressionHelper.cpp @@ -21,8 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - #include "SketcherTransformationExpressionHelper.h" #include diff --git a/src/Tools/_TEMPLATE_/App/App_TEMPLATE_.cpp b/src/Tools/_TEMPLATE_/App/App_TEMPLATE_.cpp index 25ecde2108..11f7bd5634 100644 --- a/src/Tools/_TEMPLATE_/App/App_TEMPLATE_.cpp +++ b/src/Tools/_TEMPLATE_/App/App_TEMPLATE_.cpp @@ -21,10 +21,8 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Tools/_TEMPLATE_/App/CMakeLists.txt b/src/Tools/_TEMPLATE_/App/CMakeLists.txt index 9c1a787b09..e8c7bf776f 100644 --- a/src/Tools/_TEMPLATE_/App/CMakeLists.txt +++ b/src/Tools/_TEMPLATE_/App/CMakeLists.txt @@ -4,7 +4,6 @@ set(_TEMPLATE__LIBS SET(_TEMPLATE__SRCS App_TEMPLATE_.cpp - PreCompiled.cpp PreCompiled.h ) diff --git a/src/Tools/_TEMPLATE_/App/PreCompiled.cpp b/src/Tools/_TEMPLATE_/App/PreCompiled.cpp deleted file mode 100644 index ccd1b7fe10..0000000000 --- a/src/Tools/_TEMPLATE_/App/PreCompiled.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/*************************************************************************** - * Copyright (c) YEAR YOUR NAME * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" diff --git a/src/Tools/_TEMPLATE_/App/PreCompiled.h b/src/Tools/_TEMPLATE_/App/PreCompiled.h index e3ccb18815..833f94ecb2 100644 --- a/src/Tools/_TEMPLATE_/App/PreCompiled.h +++ b/src/Tools/_TEMPLATE_/App/PreCompiled.h @@ -33,8 +33,6 @@ #define _TEMPLATE_AppExport #endif -#ifdef _PreComp_ - // standard #include #include @@ -55,6 +53,4 @@ // Xerces #include -#endif //_PreComp_ - #endif diff --git a/src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_Gui.cpp b/src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_Gui.cpp index 52d3053a72..229417fb84 100644 --- a/src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_Gui.cpp +++ b/src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_Gui.cpp @@ -21,10 +21,8 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif + #include #include diff --git a/src/Tools/_TEMPLATE_/Gui/CMakeLists.txt b/src/Tools/_TEMPLATE_/Gui/CMakeLists.txt index 986d3de041..6dad95a5df 100644 --- a/src/Tools/_TEMPLATE_/Gui/CMakeLists.txt +++ b/src/Tools/_TEMPLATE_/Gui/CMakeLists.txt @@ -14,7 +14,6 @@ SET(_TEMPLATE_Gui_SRCS ${_TEMPLATE__QRC_SRCS} App_TEMPLATE_Gui.cpp Command.cpp - PreCompiled.cpp PreCompiled.h Workbench.cpp Workbench.h diff --git a/src/Tools/_TEMPLATE_/Gui/Command.cpp b/src/Tools/_TEMPLATE_/Gui/Command.cpp index 008c0973b5..d5bf6eab5d 100644 --- a/src/Tools/_TEMPLATE_/Gui/Command.cpp +++ b/src/Tools/_TEMPLATE_/Gui/Command.cpp @@ -20,11 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ -#endif - #include #include #include diff --git a/src/Tools/_TEMPLATE_/Gui/PreCompiled.cpp b/src/Tools/_TEMPLATE_/Gui/PreCompiled.cpp deleted file mode 100644 index ccd1b7fe10..0000000000 --- a/src/Tools/_TEMPLATE_/Gui/PreCompiled.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/*************************************************************************** - * Copyright (c) YEAR YOUR NAME * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - - -#include "PreCompiled.h" diff --git a/src/Tools/_TEMPLATE_/Gui/PreCompiled.h b/src/Tools/_TEMPLATE_/Gui/PreCompiled.h index c7ec7c084a..258c7f83c7 100644 --- a/src/Tools/_TEMPLATE_/Gui/PreCompiled.h +++ b/src/Tools/_TEMPLATE_/Gui/PreCompiled.h @@ -35,8 +35,6 @@ #define _TEMPLATE_GuiExport #endif -#ifdef _PreComp_ - // standard #include #include @@ -63,6 +61,4 @@ // Qt Toolkit #include -#endif //_PreComp_ - #endif // GUI_PRECOMPILED_H diff --git a/src/Tools/_TEMPLATE_/Gui/Workbench.cpp b/src/Tools/_TEMPLATE_/Gui/Workbench.cpp index b5e10b04b6..529435aa32 100644 --- a/src/Tools/_TEMPLATE_/Gui/Workbench.cpp +++ b/src/Tools/_TEMPLATE_/Gui/Workbench.cpp @@ -20,12 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - -#ifndef _PreComp_ -#endif - #include "Workbench.h" #include #include diff --git a/src/Tools/bindings/templates/templateCPPFile.py b/src/Tools/bindings/templates/templateCPPFile.py index e6fbbd0164..0e0e327f69 100644 --- a/src/Tools/bindings/templates/templateCPPFile.py +++ b/src/Tools/bindings/templates/templateCPPFile.py @@ -37,5 +37,4 @@ Template = """ ***************************************************************************/ -#include "PreCompiled.h" """ diff --git a/src/Tools/bindings/templates/templateClassPyExport.py b/src/Tools/bindings/templates/templateClassPyExport.py index b339a1aeea..6660115b0f 100644 --- a/src/Tools/bindings/templates/templateClassPyExport.py +++ b/src/Tools/bindings/templates/templateClassPyExport.py @@ -1235,7 +1235,6 @@ int @self.export.Name@::descriptorSetter(PyObject* self, PyObject* obj, PyObject # Here's the template for the user part of the implementation. This does NOT get overridden if it already exists. TemplateImplement = """ -#include "PreCompiled.h" #include "@self.export.Include@" diff --git a/src/Tools/bindings/templates/templateModuleAppFeature.py b/src/Tools/bindings/templates/templateModuleAppFeature.py index 0821cda539..a115b28868 100644 --- a/src/Tools/bindings/templates/templateModuleAppFeature.py +++ b/src/Tools/bindings/templates/templateModuleAppFeature.py @@ -56,7 +56,6 @@ public: """ TemplateModule = """ -#include "PreCompiled.h" #include "@self.feature.Name@.h" @@ -74,7 +73,6 @@ PROPERTY_SOURCE(@self.module.Name@::@self.feature.Name@, App::Feature) # Here's the template for the user part of the implementation. This does NOT get overwritten if it already exists. TemplateImplement = """ // -#include "PreCompiled.h" #include "@self.feature.Name@.h" diff --git a/src/Tools/bindings/templates/templateModuleAppMain.py b/src/Tools/bindings/templates/templateModuleAppMain.py index 144a39498a..67d2ffda2a 100644 --- a/src/Tools/bindings/templates/templateModuleAppMain.py +++ b/src/Tools/bindings/templates/templateModuleAppMain.py @@ -23,10 +23,8 @@ class TemplateModuleAppMain(template.ModelTemplate): * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ # include -#endif + #include diff --git a/src/Tools/embedded/Qt/cxx/plugin.cpp b/src/Tools/embedded/Qt/cxx/plugin.cpp index 5477bd72da..68a3d61ce6 100644 --- a/src/Tools/embedded/Qt/cxx/plugin.cpp +++ b/src/Tools/embedded/Qt/cxx/plugin.cpp @@ -1,4 +1,3 @@ -#include "PreCompiled.h" #include #include diff --git a/src/Tools/params_utils.py b/src/Tools/params_utils.py index 69d21b0cba..7ad4183710 100644 --- a/src/Tools/params_utils.py +++ b/src/Tools/params_utils.py @@ -565,14 +565,13 @@ def preference_dialog_define(param_set, header=True): cog.out( f""" {trace_comment()} -#ifndef _PreComp_ # include # include # include # include # include # include -#endif""" +""" ) for _, params in param_group: for param in params: