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: