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