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