From 73c97bc90f169772b02ca0d44b5e999781c74be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Reitb=C3=B6ck?= Date: Sat, 13 Sep 2025 11:33:00 +0200 Subject: [PATCH] App: 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/App/Annotation.cpp | 1 - src/App/Application.cpp | 4 +--- src/App/ApplicationDirectories.cpp | 5 ++--- src/App/ApplicationDirectories.h | 5 +++++ src/App/ApplicationPy.cpp | 3 +-- src/App/AutoTransaction.cpp | 1 - src/App/BackupPolicy.cpp | 4 ---- src/App/Branding.cpp | 1 - src/App/CMakeLists.txt | 6 +++--- src/App/CleanupProcess.cpp | 1 - src/App/ColorModel.cpp | 4 ---- src/App/ComplexGeoData.cpp | 5 ----- src/App/ComplexGeoDataPyImp.cpp | 4 ---- src/App/Datums.cpp | 3 --- src/App/Document.cpp | 6 ++---- src/App/DocumentObject.cpp | 4 ---- src/App/DocumentObjectExtension.cpp | 3 --- src/App/DocumentObjectExtensionPyImp.cpp | 3 --- src/App/DocumentObjectFileIncluded.cpp | 2 -- src/App/DocumentObjectGroup.cpp | 3 --- src/App/DocumentObjectGroupPyImp.cpp | 1 - src/App/DocumentObjectPyImp.cpp | 1 - src/App/DocumentObserver.cpp | 3 --- src/App/DocumentObserverPython.cpp | 4 ---- src/App/DocumentPyImp.cpp | 3 --- src/App/DynamicProperty.cpp | 4 ---- src/App/ElementMap.cpp | 3 --- src/App/ElementNamingUtils.cpp | 1 - src/App/Enumeration.cpp | 3 --- src/App/Expression.cpp | 1 - src/App/ExpressionTokenizer.cpp | 3 --- src/App/Extension.cpp | 5 ----- src/App/ExtensionContainer.cpp | 4 ---- src/App/ExtensionContainerPyImp.cpp | 5 ----- src/App/ExtensionPyImp.cpp | 3 --- src/App/FeaturePython.cpp | 4 ---- src/App/FeatureTest.cpp | 3 --- src/App/GeoFeature.cpp | 3 --- src/App/GeoFeatureGroupExtension.cpp | 3 --- src/App/GeoFeatureGroupExtensionPyImp.cpp | 1 - src/App/GeoFeaturePyImp.cpp | 3 --- src/App/Graphviz.cpp | 1 - src/App/GroupExtension.cpp | 1 - src/App/GroupExtensionPyImp.cpp | 1 - src/App/ImagePlane.cpp | 1 - src/App/IndexedName.cpp | 3 --- src/App/InventorObject.cpp | 3 --- src/App/Link.cpp | 4 ---- src/App/LinkBaseExtensionPyImp.cpp | 4 ---- src/App/MappedElement.cpp | 5 ----- src/App/MappedName.cpp | 4 ---- src/App/Material.cpp | 5 ----- src/App/MaterialObject.cpp | 3 --- src/App/MaterialPyImp.cpp | 2 -- src/App/MeasureManager.cpp | 2 +- src/App/MeasureManagerPyImp.cpp | 1 - src/App/MergeDocuments.cpp | 3 --- src/App/Metadata.cpp | 6 ++---- src/App/MetadataPyImp.cpp | 1 - src/App/ObjectIdentifier.cpp | 4 ---- src/App/Origin.cpp | 1 - src/App/OriginGroupExtension.cpp | 1 - src/App/OriginGroupExtensionPyImp.cpp | 1 - src/App/Part.cpp | 1 - src/App/PartPyImp.cpp | 1 - src/App/Path.cpp | 1 - src/App/Placement.cpp | 1 - src/App/PreCompiled.cpp | 24 ----------------------- src/App/PreCompiled.h | 4 ---- src/App/ProgramOptionsUtilities.h | 2 ++ src/App/ProjectFile.cpp | 1 - src/App/Property.cpp | 5 ----- src/App/PropertyContainer.cpp | 4 ---- src/App/PropertyContainerPyImp.cpp | 5 ----- src/App/PropertyExpressionEngine.cpp | 1 - src/App/PropertyExpressionEngine.h | 7 ++++++- src/App/PropertyFile.cpp | 2 -- src/App/PropertyGeo.cpp | 3 --- src/App/PropertyLinks.cpp | 3 --- src/App/PropertyPythonObject.cpp | 1 - src/App/PropertyStandard.cpp | 4 ---- src/App/PropertyUnits.cpp | 3 --- src/App/Range.cpp | 3 --- src/App/SafeMode.cpp | 1 - src/App/Services.cpp | 2 -- src/App/StringHasher.cpp | 1 - src/App/StringHasherPyImp.cpp | 1 - src/App/StringIDPyImp.cpp | 1 - src/App/SuppressibleExtension.cpp | 1 - src/App/SuppressibleExtensionPyImp.cpp | 1 - src/App/TextDocument.cpp | 1 - src/App/TransactionalObject.cpp | 1 - src/App/Transactions.cpp | 5 ----- src/App/VRMLObject.cpp | 3 --- src/App/VarSet.cpp | 4 ---- tests/src/App/Property.cpp | 2 ++ 96 files changed, 27 insertions(+), 259 deletions(-) delete mode 100644 src/App/PreCompiled.cpp diff --git a/src/App/Annotation.cpp b/src/App/Annotation.cpp index fc620feb68..442298a8c0 100644 --- a/src/App/Annotation.cpp +++ b/src/App/Annotation.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "Annotation.h" diff --git a/src/App/Application.cpp b/src/App/Application.cpp index a5dd147c00..1e96d4a8fe 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -21,9 +21,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include -#ifndef _PreComp_ # if defined(FC_OS_LINUX) || defined(FC_OS_MACOSX) || defined(FC_OS_BSD) # include # include @@ -48,7 +47,6 @@ # include # include # include -#endif #ifdef FC_OS_WIN32 # include diff --git a/src/App/ApplicationDirectories.cpp b/src/App/ApplicationDirectories.cpp index 22b357be47..2102bd49bc 100644 --- a/src/App/ApplicationDirectories.cpp +++ b/src/App/ApplicationDirectories.cpp @@ -19,18 +19,17 @@ * * **************************************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include #include #include -#endif #include "ApplicationDirectories.h" +#include + #if defined(FC_OS_LINUX) || defined(FC_OS_MACOSX) || defined(FC_OS_BSD) #include #endif diff --git a/src/App/ApplicationDirectories.h b/src/App/ApplicationDirectories.h index 5e8d770ad3..0b2dcc6bc2 100644 --- a/src/App/ApplicationDirectories.h +++ b/src/App/ApplicationDirectories.h @@ -22,6 +22,7 @@ #ifndef SRC_APP_APPLICATIONDIRECTORIES_H_ #define SRC_APP_APPLICATIONDIRECTORIES_H_ +#include "FCConfig.h" #include "FCGlobal.h" #include @@ -29,6 +30,10 @@ #include #include +#ifdef FC_OS_WIN32 +#include +#endif + namespace App { /// A helper class to handle application-wide directory management on behalf of the main diff --git a/src/App/ApplicationPy.cpp b/src/App/ApplicationPy.cpp index 97a5068c06..5d650b63a4 100644 --- a/src/App/ApplicationPy.cpp +++ b/src/App/ApplicationPy.cpp @@ -21,8 +21,7 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" +#include #include #include diff --git a/src/App/AutoTransaction.cpp b/src/App/AutoTransaction.cpp index ccb42c111e..5e1ba49eb5 100644 --- a/src/App/AutoTransaction.cpp +++ b/src/App/AutoTransaction.cpp @@ -20,7 +20,6 @@ * * ****************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/App/BackupPolicy.cpp b/src/App/BackupPolicy.cpp index c66b7f4f29..ebfd14b08a 100644 --- a/src/App/BackupPolicy.cpp +++ b/src/App/BackupPolicy.cpp @@ -21,13 +21,9 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ #include #include #include -#endif #include #include diff --git a/src/App/Branding.cpp b/src/App/Branding.cpp index 8083476729..e0152ca528 100644 --- a/src/App/Branding.cpp +++ b/src/App/Branding.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/App/CMakeLists.txt b/src/App/CMakeLists.txt index 97e372b07e..8792e7b5ae 100644 --- a/src/App/CMakeLists.txt +++ b/src/App/CMakeLists.txt @@ -344,13 +344,13 @@ SET(FreeCADApp_SRCS ${FreeCADApp_Pyi_SRCS} FreeCADInit.py FreeCADTest.py - PreCompiled.cpp PreCompiled.h ) if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - ADD_MSVC_PRECOMPILED_HEADER(FreeCADApp PreCompiled.h PreCompiled.cpp FreeCADApp_CPP_SRCS) + target_precompile_headers(FreeCADApp PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) endif(FREECAD_USE_PCH) target_sources(FreeCADApp PRIVATE ${FreeCADApp_SRCS}) diff --git a/src/App/CleanupProcess.cpp b/src/App/CleanupProcess.cpp index 038de1abd3..507528c34b 100644 --- a/src/App/CleanupProcess.cpp +++ b/src/App/CleanupProcess.cpp @@ -21,7 +21,6 @@ * * **************************************************************************/ -#include "PreCompiled.h" #include #include "CleanupProcess.h" diff --git a/src/App/ColorModel.cpp b/src/App/ColorModel.cpp index 706ad52b24..eb4b1dfed8 100644 --- a/src/App/ColorModel.cpp +++ b/src/App/ColorModel.cpp @@ -20,11 +20,7 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif #include diff --git a/src/App/ComplexGeoData.cpp b/src/App/ComplexGeoData.cpp index 1acfbf7462..19dbb7137b 100644 --- a/src/App/ComplexGeoData.cpp +++ b/src/App/ComplexGeoData.cpp @@ -23,13 +23,8 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" // NOLINT - -#ifndef _PreComp_ #include #include -#endif #include diff --git a/src/App/ComplexGeoDataPyImp.cpp b/src/App/ComplexGeoDataPyImp.cpp index b02b696447..4cd6116d05 100644 --- a/src/App/ComplexGeoDataPyImp.cpp +++ b/src/App/ComplexGeoDataPyImp.cpp @@ -20,11 +20,7 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif #include "ComplexGeoData.h" #include "StringHasher.h" diff --git a/src/App/Datums.cpp b/src/App/Datums.cpp index 318203f821..059e6d6712 100644 --- a/src/App/Datums.cpp +++ b/src/App/Datums.cpp @@ -21,10 +21,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif #include #include diff --git a/src/App/Document.cpp b/src/App/Document.cpp index 246a76e388..ed2a2e2006 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ #include #include #include @@ -36,7 +33,6 @@ #include #include #include -#endif #include #include @@ -50,6 +46,8 @@ #include #include +#include + #include #include #include diff --git a/src/App/DocumentObject.cpp b/src/App/DocumentObject.cpp index cf572492fb..1d327dd080 100644 --- a/src/App/DocumentObject.cpp +++ b/src/App/DocumentObject.cpp @@ -21,16 +21,12 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include #include #include -#endif #include #include diff --git a/src/App/DocumentObjectExtension.cpp b/src/App/DocumentObjectExtension.cpp index c98e0d9f74..9499fa4e2b 100644 --- a/src/App/DocumentObjectExtension.cpp +++ b/src/App/DocumentObjectExtension.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - #include "DocumentObjectExtension.h" #include "DocumentObjectExtensionPy.h" #include "DocumentObject.h" diff --git a/src/App/DocumentObjectExtensionPyImp.cpp b/src/App/DocumentObjectExtensionPyImp.cpp index 16f7ac36b5..2bac9bd980 100644 --- a/src/App/DocumentObjectExtensionPyImp.cpp +++ b/src/App/DocumentObjectExtensionPyImp.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - // inclusion of the generated files (generated out of PropertyContainerPy.xml) #include "DocumentObjectExtensionPy.h" #include "DocumentObjectExtensionPy.cpp" diff --git a/src/App/DocumentObjectFileIncluded.cpp b/src/App/DocumentObjectFileIncluded.cpp index 9f10aacd62..cd03d50529 100644 --- a/src/App/DocumentObjectFileIncluded.cpp +++ b/src/App/DocumentObjectFileIncluded.cpp @@ -21,8 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" - #include "DocumentObjectFileIncluded.h" using namespace App; diff --git a/src/App/DocumentObjectGroup.cpp b/src/App/DocumentObjectGroup.cpp index 167d6de627..cf36693e4e 100644 --- a/src/App/DocumentObjectGroup.cpp +++ b/src/App/DocumentObjectGroup.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - #include "DocumentObjectGroup.h" #include "DocumentObjectGroupPy.h" #include "FeaturePythonPyImp.h" diff --git a/src/App/DocumentObjectGroupPyImp.cpp b/src/App/DocumentObjectGroupPyImp.cpp index 9c32502c6e..f52657a527 100644 --- a/src/App/DocumentObjectGroupPyImp.cpp +++ b/src/App/DocumentObjectGroupPyImp.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "DocumentObjectGroup.h" diff --git a/src/App/DocumentObjectPyImp.cpp b/src/App/DocumentObjectPyImp.cpp index 9a1a7d0322..d924b12740 100644 --- a/src/App/DocumentObjectPyImp.cpp +++ b/src/App/DocumentObjectPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/App/DocumentObserver.cpp b/src/App/DocumentObserver.cpp index 0bbb616a52..6d1419c6e0 100644 --- a/src/App/DocumentObserver.cpp +++ b/src/App/DocumentObserver.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - #include #include "Application.h" diff --git a/src/App/DocumentObserverPython.cpp b/src/App/DocumentObserverPython.cpp index 22a61ecdb1..b070497518 100644 --- a/src/App/DocumentObserverPython.cpp +++ b/src/App/DocumentObserverPython.cpp @@ -20,11 +20,7 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif #include #include "Application.h" diff --git a/src/App/DocumentPyImp.cpp b/src/App/DocumentPyImp.cpp index 22df71f1f5..ca119fecde 100644 --- a/src/App/DocumentPyImp.cpp +++ b/src/App/DocumentPyImp.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - #include #include #include diff --git a/src/App/DynamicProperty.cpp b/src/App/DynamicProperty.cpp index 18f5c5ac9b..0ba677ad1b 100644 --- a/src/App/DynamicProperty.cpp +++ b/src/App/DynamicProperty.cpp @@ -20,13 +20,9 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif #include #include diff --git a/src/App/ElementMap.cpp b/src/App/ElementMap.cpp index da3fd7636d..f5851ccc58 100644 --- a/src/App/ElementMap.cpp +++ b/src/App/ElementMap.cpp @@ -1,10 +1,7 @@ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #ifndef FC_DEBUG #include #endif -#endif #include "ElementMap.h" #include "ElementNamingUtils.h" diff --git a/src/App/ElementNamingUtils.cpp b/src/App/ElementNamingUtils.cpp index 8d17603219..e10b29a344 100644 --- a/src/App/ElementNamingUtils.cpp +++ b/src/App/ElementNamingUtils.cpp @@ -1,4 +1,3 @@ -#include "PreCompiled.h" #include "ElementNamingUtils.h" #include diff --git a/src/App/Enumeration.cpp b/src/App/Enumeration.cpp index 595292f0a1..5de12bbf26 100644 --- a/src/App/Enumeration.cpp +++ b/src/App/Enumeration.cpp @@ -20,11 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif #include #include "Enumeration.h" diff --git a/src/App/Expression.cpp b/src/App/Expression.cpp index 8f36832932..08c8edcf3b 100644 --- a/src/App/Expression.cpp +++ b/src/App/Expression.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #ifdef __GNUC__ # include #endif diff --git a/src/App/ExpressionTokenizer.cpp b/src/App/ExpressionTokenizer.cpp index 751b860a36..f09eee8284 100644 --- a/src/App/ExpressionTokenizer.cpp +++ b/src/App/ExpressionTokenizer.cpp @@ -20,11 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif #include "ExpressionParser.h" #include "ExpressionTokenizer.h" diff --git a/src/App/Extension.cpp b/src/App/Extension.cpp index c8e8af584f..9da5491bb2 100644 --- a/src/App/Extension.cpp +++ b/src/App/Extension.cpp @@ -20,15 +20,10 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - -#ifndef _PreComp_ #include #include #include #include -#endif #include diff --git a/src/App/ExtensionContainer.cpp b/src/App/ExtensionContainer.cpp index bf3b1c10fd..f56ec4691b 100644 --- a/src/App/ExtensionContainer.cpp +++ b/src/App/ExtensionContainer.cpp @@ -20,13 +20,9 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif #include #include diff --git a/src/App/ExtensionContainerPyImp.cpp b/src/App/ExtensionContainerPyImp.cpp index 846f949cb8..c1c7596e63 100644 --- a/src/App/ExtensionContainerPyImp.cpp +++ b/src/App/ExtensionContainerPyImp.cpp @@ -20,12 +20,7 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - -#ifndef _PreComp_ #include -#endif #include "Application.h" diff --git a/src/App/ExtensionPyImp.cpp b/src/App/ExtensionPyImp.cpp index 4b8afc4123..486cdf542a 100644 --- a/src/App/ExtensionPyImp.cpp +++ b/src/App/ExtensionPyImp.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - #include "ExtensionContainer.h" // inclusion of the generated files (generated out of ExtensionPy.pyi) diff --git a/src/App/FeaturePython.cpp b/src/App/FeaturePython.cpp index 433289fc08..9d501d3397 100644 --- a/src/App/FeaturePython.cpp +++ b/src/App/FeaturePython.cpp @@ -20,11 +20,7 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif #include #include diff --git a/src/App/FeatureTest.cpp b/src/App/FeatureTest.cpp index 93bbcb95ab..e93b7ef5e4 100644 --- a/src/App/FeatureTest.cpp +++ b/src/App/FeatureTest.cpp @@ -21,11 +21,8 @@ ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif #include #include diff --git a/src/App/GeoFeature.cpp b/src/App/GeoFeature.cpp index 1c39bd4e70..844c245b45 100644 --- a/src/App/GeoFeature.cpp +++ b/src/App/GeoFeature.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - #include #include diff --git a/src/App/GeoFeatureGroupExtension.cpp b/src/App/GeoFeatureGroupExtension.cpp index 0d0fd7c76a..84e7ac3c59 100644 --- a/src/App/GeoFeatureGroupExtension.cpp +++ b/src/App/GeoFeatureGroupExtension.cpp @@ -21,9 +21,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - #include #include diff --git a/src/App/GeoFeatureGroupExtensionPyImp.cpp b/src/App/GeoFeatureGroupExtensionPyImp.cpp index 48660bb41e..971ad8e9ce 100644 --- a/src/App/GeoFeatureGroupExtensionPyImp.cpp +++ b/src/App/GeoFeatureGroupExtensionPyImp.cpp @@ -22,7 +22,6 @@ ***************************************************************************/ -#include "PreCompiled.h" // inclusion of the generated files (generated out of GeoFeatureGroupExtensionPy.xml) #include "GeoFeatureGroupExtensionPy.h" diff --git a/src/App/GeoFeaturePyImp.cpp b/src/App/GeoFeaturePyImp.cpp index 2d78e69867..6e24f34b17 100644 --- a/src/App/GeoFeaturePyImp.cpp +++ b/src/App/GeoFeaturePyImp.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - // inclusion of the generated files (generated out of GeoFeaturePy.xml) #include "GeoFeaturePy.h" #include "GeoFeaturePy.cpp" diff --git a/src/App/Graphviz.cpp b/src/App/Graphviz.cpp index aca3509cfc..6be2191b62 100644 --- a/src/App/Graphviz.cpp +++ b/src/App/Graphviz.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/App/GroupExtension.cpp b/src/App/GroupExtension.cpp index 35b89da49b..9859234bf2 100644 --- a/src/App/GroupExtension.cpp +++ b/src/App/GroupExtension.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/App/GroupExtensionPyImp.cpp b/src/App/GroupExtensionPyImp.cpp index 72e2eacc80..02160f710f 100644 --- a/src/App/GroupExtensionPyImp.cpp +++ b/src/App/GroupExtensionPyImp.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "DocumentObject.h" diff --git a/src/App/ImagePlane.cpp b/src/App/ImagePlane.cpp index 120575871e..2de6456d7b 100644 --- a/src/App/ImagePlane.cpp +++ b/src/App/ImagePlane.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "ImagePlane.h" diff --git a/src/App/IndexedName.cpp b/src/App/IndexedName.cpp index 86fd2234b6..bb07b6cee8 100644 --- a/src/App/IndexedName.cpp +++ b/src/App/IndexedName.cpp @@ -23,12 +23,9 @@ ***************************************************************************/ // NOLINTNEXTLINE -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif #include "IndexedName.h" diff --git a/src/App/InventorObject.cpp b/src/App/InventorObject.cpp index 255baee052..4c16bfdd46 100644 --- a/src/App/InventorObject.cpp +++ b/src/App/InventorObject.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - #include "InventorObject.h" #include "DocumentObjectPy.h" diff --git a/src/App/Link.cpp b/src/App/Link.cpp index 4d515298be..60e168688b 100644 --- a/src/App/Link.cpp +++ b/src/App/Link.cpp @@ -20,11 +20,7 @@ * * ****************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ #include -#endif #include #include diff --git a/src/App/LinkBaseExtensionPyImp.cpp b/src/App/LinkBaseExtensionPyImp.cpp index 16b900fae5..03074f27df 100644 --- a/src/App/LinkBaseExtensionPyImp.cpp +++ b/src/App/LinkBaseExtensionPyImp.cpp @@ -20,11 +20,7 @@ * * ****************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ #include -#endif #include "DocumentObjectPy.h" #include "LinkBaseExtensionPy.h" diff --git a/src/App/MappedElement.cpp b/src/App/MappedElement.cpp index 82d8daf4ee..92a5181c62 100644 --- a/src/App/MappedElement.cpp +++ b/src/App/MappedElement.cpp @@ -20,13 +20,8 @@ * * **************************************************************************************************/ -// NOLINTNEXTLINE -#include "PreCompiled.h" - -#ifndef _PreComp_ #include #include -#endif #include "DocumentObject.h" #include "MappedElement.h" diff --git a/src/App/MappedName.cpp b/src/App/MappedName.cpp index 2f00e75335..aab714b8b4 100644 --- a/src/App/MappedName.cpp +++ b/src/App/MappedName.cpp @@ -20,11 +20,7 @@ * * ****************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ #include -#endif #include "MappedName.h" diff --git a/src/App/Material.cpp b/src/App/Material.cpp index 3da7b57c23..423d1c4821 100644 --- a/src/App/Material.cpp +++ b/src/App/Material.cpp @@ -20,13 +20,8 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - -#ifndef _PreComp_ #include #include -#endif #include "Application.h" #include "Material.h" diff --git a/src/App/MaterialObject.cpp b/src/App/MaterialObject.cpp index da866b7835..e5e09fbea9 100644 --- a/src/App/MaterialObject.cpp +++ b/src/App/MaterialObject.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - #include "MaterialObject.h" diff --git a/src/App/MaterialPyImp.cpp b/src/App/MaterialPyImp.cpp index 6bdd068be6..7532a7462b 100644 --- a/src/App/MaterialPyImp.cpp +++ b/src/App/MaterialPyImp.cpp @@ -21,8 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" - // inclusion of the generated files (generated out of MaterialPy.xml) #include "MaterialPy.h" diff --git a/src/App/MeasureManager.cpp b/src/App/MeasureManager.cpp index 1047aad850..ac24f11e41 100644 --- a/src/App/MeasureManager.cpp +++ b/src/App/MeasureManager.cpp @@ -19,7 +19,7 @@ * . * * * **************************************************************************/ -#include "PreCompiled.h" + #include #include #include diff --git a/src/App/MeasureManagerPyImp.cpp b/src/App/MeasureManagerPyImp.cpp index bcb5d08a65..4c1c1c9f5c 100644 --- a/src/App/MeasureManagerPyImp.cpp +++ b/src/App/MeasureManagerPyImp.cpp @@ -20,7 +20,6 @@ * * **************************************************************************/ -#include "PreCompiled.h" // inclusion of the generated files (generated out of MeasureManagerPy.xml) #include "MeasureManagerPy.h" diff --git a/src/App/MergeDocuments.cpp b/src/App/MergeDocuments.cpp index 10386f75ff..e499786fdf 100644 --- a/src/App/MergeDocuments.cpp +++ b/src/App/MergeDocuments.cpp @@ -20,10 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif #include #include diff --git a/src/App/Metadata.cpp b/src/App/Metadata.cpp index d91817624f..e8478c64a9 100644 --- a/src/App/Metadata.cpp +++ b/src/App/Metadata.cpp @@ -20,19 +20,17 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ #include #include #include -#endif #include #include #include #include +#include + #include "App/Application.h" #include "App/Expression.h" #include "Base/XMLTools.h" diff --git a/src/App/MetadataPyImp.cpp b/src/App/MetadataPyImp.cpp index c751daa2f3..c372344d23 100644 --- a/src/App/MetadataPyImp.cpp +++ b/src/App/MetadataPyImp.cpp @@ -20,7 +20,6 @@ * * **************************************************************************/ -#include "PreCompiled.h" #include "Metadata.h" diff --git a/src/App/ObjectIdentifier.cpp b/src/App/ObjectIdentifier.cpp index b650897073..8ea0198778 100644 --- a/src/App/ObjectIdentifier.cpp +++ b/src/App/ObjectIdentifier.cpp @@ -20,12 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ #include #include -#endif #include diff --git a/src/App/Origin.cpp b/src/App/Origin.cpp index 4f5cbf3c65..eb91da2f4a 100644 --- a/src/App/Origin.cpp +++ b/src/App/Origin.cpp @@ -21,7 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/App/OriginGroupExtension.cpp b/src/App/OriginGroupExtension.cpp index 5b8a9a0163..96c1654581 100644 --- a/src/App/OriginGroupExtension.cpp +++ b/src/App/OriginGroupExtension.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/App/OriginGroupExtensionPyImp.cpp b/src/App/OriginGroupExtensionPyImp.cpp index f4021550ce..20b4f025e3 100644 --- a/src/App/OriginGroupExtensionPyImp.cpp +++ b/src/App/OriginGroupExtensionPyImp.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" // inclusion of the generated files (generated out of OriginGroupPy.xml) #include "OriginGroupExtensionPy.h" diff --git a/src/App/Part.cpp b/src/App/Part.cpp index b43b60db24..79d81cd1e0 100644 --- a/src/App/Part.cpp +++ b/src/App/Part.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/App/PartPyImp.cpp b/src/App/PartPyImp.cpp index ddfba84183..24c1d6f857 100644 --- a/src/App/PartPyImp.cpp +++ b/src/App/PartPyImp.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" // inclusion of the generated files (generated out of PartPy.xml) #include "PartPy.h" diff --git a/src/App/Path.cpp b/src/App/Path.cpp index 0665a316b6..59336dae2c 100644 --- a/src/App/Path.cpp +++ b/src/App/Path.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "Path.h" diff --git a/src/App/Placement.cpp b/src/App/Placement.cpp index b3c0dabf2a..63c07470b0 100644 --- a/src/App/Placement.cpp +++ b/src/App/Placement.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/App/PreCompiled.cpp b/src/App/PreCompiled.cpp deleted file mode 100644 index 7b200a1bf2..0000000000 --- a/src/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/App/PreCompiled.h b/src/App/PreCompiled.h index e13c4a14e7..1b7834d4c0 100644 --- a/src/App/PreCompiled.h +++ b/src/App/PreCompiled.h @@ -25,8 +25,6 @@ #include -#ifdef _PreComp_ - // standard #include #include @@ -92,6 +90,4 @@ #include #include -#endif //_PreComp_ - #endif // APP_PRECOMPILED_H diff --git a/src/App/ProgramOptionsUtilities.h b/src/App/ProgramOptionsUtilities.h index c611357f52..fe2a0d284e 100644 --- a/src/App/ProgramOptionsUtilities.h +++ b/src/App/ProgramOptionsUtilities.h @@ -24,6 +24,8 @@ #ifndef PROGRAMOPTIONSUTILITIES_H #define PROGRAMOPTIONSUTILITIES_H +#include + #include #include #include diff --git a/src/App/ProjectFile.cpp b/src/App/ProjectFile.cpp index cf56233bc5..142d92bd08 100644 --- a/src/App/ProjectFile.cpp +++ b/src/App/ProjectFile.cpp @@ -22,7 +22,6 @@ **************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/App/Property.cpp b/src/App/Property.cpp index 1764e9778c..8c0efdbaf3 100644 --- a/src/App/Property.cpp +++ b/src/App/Property.cpp @@ -20,12 +20,7 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - -#ifndef _PreComp_ #include -#endif #include #include diff --git a/src/App/PropertyContainer.cpp b/src/App/PropertyContainer.cpp index 931494416a..991aa439aa 100644 --- a/src/App/PropertyContainer.cpp +++ b/src/App/PropertyContainer.cpp @@ -20,13 +20,9 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include -#endif #include #include diff --git a/src/App/PropertyContainerPyImp.cpp b/src/App/PropertyContainerPyImp.cpp index cde8b6abf0..cba8d8285e 100644 --- a/src/App/PropertyContainerPyImp.cpp +++ b/src/App/PropertyContainerPyImp.cpp @@ -20,12 +20,7 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - -#ifndef _PreComp_ #include -#endif #include "PropertyContainer.h" #include "Property.h" diff --git a/src/App/PropertyExpressionEngine.cpp b/src/App/PropertyExpressionEngine.cpp index 41986f1806..1554b92359 100644 --- a/src/App/PropertyExpressionEngine.cpp +++ b/src/App/PropertyExpressionEngine.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/App/PropertyExpressionEngine.h b/src/App/PropertyExpressionEngine.h index 266aea4160..32be3d9ef7 100644 --- a/src/App/PropertyExpressionEngine.h +++ b/src/App/PropertyExpressionEngine.h @@ -24,12 +24,17 @@ #define EXPRESSIONENGINE_H #include +#include + #include #include #include #include + +#include + #include -#include + namespace Base { diff --git a/src/App/PropertyFile.cpp b/src/App/PropertyFile.cpp index d1ca2f5336..e2aa3e91f6 100644 --- a/src/App/PropertyFile.cpp +++ b/src/App/PropertyFile.cpp @@ -21,8 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" - #include #include #include diff --git a/src/App/PropertyGeo.cpp b/src/App/PropertyGeo.cpp index ad857a41d0..bcb8a7a413 100644 --- a/src/App/PropertyGeo.cpp +++ b/src/App/PropertyGeo.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - #include #include #include diff --git a/src/App/PropertyLinks.cpp b/src/App/PropertyLinks.cpp index a493fafc26..6cd257459c 100644 --- a/src/App/PropertyLinks.cpp +++ b/src/App/PropertyLinks.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - #include #include #include diff --git a/src/App/PropertyPythonObject.cpp b/src/App/PropertyPythonObject.cpp index bfec6b3ac9..2d430f0019 100644 --- a/src/App/PropertyPythonObject.cpp +++ b/src/App/PropertyPythonObject.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/App/PropertyStandard.cpp b/src/App/PropertyStandard.cpp index e93470a8e5..6ebe158bdb 100644 --- a/src/App/PropertyStandard.cpp +++ b/src/App/PropertyStandard.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include @@ -31,7 +28,6 @@ #include #include #include -#endif #include #include diff --git a/src/App/PropertyUnits.cpp b/src/App/PropertyUnits.cpp index ca38aed84a..ecb0a68397 100644 --- a/src/App/PropertyUnits.cpp +++ b/src/App/PropertyUnits.cpp @@ -20,10 +20,7 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include -#endif #include #include diff --git a/src/App/Range.cpp b/src/App/Range.cpp index 22d243dcf7..0f0f3a99ab 100644 --- a/src/App/Range.cpp +++ b/src/App/Range.cpp @@ -20,15 +20,12 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include #include #include -#endif #include #include diff --git a/src/App/SafeMode.cpp b/src/App/SafeMode.cpp index 72a065b5c5..40a27c7dd6 100644 --- a/src/App/SafeMode.cpp +++ b/src/App/SafeMode.cpp @@ -21,7 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/App/Services.cpp b/src/App/Services.cpp index db3ae3d57e..ae70735441 100644 --- a/src/App/Services.cpp +++ b/src/App/Services.cpp @@ -21,8 +21,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" - #include "Services.h" std::optional diff --git a/src/App/StringHasher.cpp b/src/App/StringHasher.cpp index fcff4b96b5..cdced9ba03 100644 --- a/src/App/StringHasher.cpp +++ b/src/App/StringHasher.cpp @@ -20,7 +20,6 @@ * * **************************************************************************************************/ -#include "PreCompiled.h" #include #include diff --git a/src/App/StringHasherPyImp.cpp b/src/App/StringHasherPyImp.cpp index ef466fe919..dc3023cf87 100644 --- a/src/App/StringHasherPyImp.cpp +++ b/src/App/StringHasherPyImp.cpp @@ -20,7 +20,6 @@ * * ****************************************************************************/ -#include "PreCompiled.h" #include "StringHasher.h" diff --git a/src/App/StringIDPyImp.cpp b/src/App/StringIDPyImp.cpp index 28a3e2abc3..1c5eb51360 100644 --- a/src/App/StringIDPyImp.cpp +++ b/src/App/StringIDPyImp.cpp @@ -20,7 +20,6 @@ * * ****************************************************************************/ -#include "PreCompiled.h" #include "StringHasher.h" diff --git a/src/App/SuppressibleExtension.cpp b/src/App/SuppressibleExtension.cpp index 5add18392b..2e68ff549d 100644 --- a/src/App/SuppressibleExtension.cpp +++ b/src/App/SuppressibleExtension.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include diff --git a/src/App/SuppressibleExtensionPyImp.cpp b/src/App/SuppressibleExtensionPyImp.cpp index d6e4053f8a..f0b0f23658 100644 --- a/src/App/SuppressibleExtensionPyImp.cpp +++ b/src/App/SuppressibleExtensionPyImp.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ -#include "PreCompiled.h" #include "DocumentObject.h" diff --git a/src/App/TextDocument.cpp b/src/App/TextDocument.cpp index 7d3d30d0bf..210b97816b 100644 --- a/src/App/TextDocument.cpp +++ b/src/App/TextDocument.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "TextDocument.h" #include "DocumentObject.h" diff --git a/src/App/TransactionalObject.cpp b/src/App/TransactionalObject.cpp index 5e9340dddd..b58aef2f68 100644 --- a/src/App/TransactionalObject.cpp +++ b/src/App/TransactionalObject.cpp @@ -21,7 +21,6 @@ ***************************************************************************/ -#include "PreCompiled.h" #include "TransactionalObject.h" #include "Document.h" diff --git a/src/App/Transactions.cpp b/src/App/Transactions.cpp index ba96d7c3ea..ee4d944f04 100644 --- a/src/App/Transactions.cpp +++ b/src/App/Transactions.cpp @@ -21,12 +21,7 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - -#ifndef _PreComp_ #include -#endif #include #include diff --git a/src/App/VRMLObject.cpp b/src/App/VRMLObject.cpp index 6844fd9327..34bdbe5b61 100644 --- a/src/App/VRMLObject.cpp +++ b/src/App/VRMLObject.cpp @@ -20,9 +20,6 @@ * * ***************************************************************************/ - -#include "PreCompiled.h" - #include "VRMLObject.h" #include "Document.h" #include "DocumentObjectPy.h" diff --git a/src/App/VarSet.cpp b/src/App/VarSet.cpp index c02ba03430..0ed3e5c814 100644 --- a/src/App/VarSet.cpp +++ b/src/App/VarSet.cpp @@ -20,11 +20,7 @@ * * ****************************************************************************/ -#include "PreCompiled.h" - -#ifndef _PreComp_ #include -#endif #include "VarSet.h" #include "DocumentObject.h" diff --git a/tests/src/App/Property.cpp b/tests/src/App/Property.cpp index f21893cdf0..0006f4cf12 100644 --- a/tests/src/App/Property.cpp +++ b/tests/src/App/Property.cpp @@ -23,6 +23,8 @@ #include +#include + #include #include #include