Merge pull request #24240 from mrpilot2/cmake_pch_mods_part_2
Mods: use CMake to generate precompiled headers on all platforms
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Interpreter.h>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <Base/Interpreter.h>
|
||||
#include <Base/Tools.h>
|
||||
|
||||
@@ -21,11 +21,9 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
#endif
|
||||
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
// inclusion of the generated files (generated out of AssemblyLink.xml)
|
||||
#include "AssemblyLinkPy.h"
|
||||
#include "AssemblyLinkPy.cpp"
|
||||
|
||||
@@ -21,13 +21,11 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#endif
|
||||
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/Datums.h>
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
// inclusion of the generated files (generated out of AssemblyObject.xml)
|
||||
#include "AssemblyObjectPy.h"
|
||||
#include "AssemblyObjectPy.cpp"
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
@@ -30,7 +28,7 @@
|
||||
#include <gp_Circ.hxx>
|
||||
#include <gp_Cylinder.hxx>
|
||||
#include <gp_Sphere.hxx>
|
||||
#endif
|
||||
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/Datums.h>
|
||||
|
||||
@@ -21,10 +21,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
#endif
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
#include <App/FeaturePythonPyImp.h>
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
// inclusion of the generated files (generated out of BomGroup.xml)
|
||||
#include "BomGroupPy.h"
|
||||
#include "BomGroupPy.cpp"
|
||||
|
||||
@@ -21,11 +21,9 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
#endif
|
||||
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
// inclusion of the generated files (generated out of BomObject.xml)
|
||||
#include "BomObjectPy.h"
|
||||
#include "BomObjectPy.cpp"
|
||||
|
||||
@@ -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
|
||||
$<$<COMPILE_LANGUAGE:CXX>:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h">
|
||||
)
|
||||
endif(FREECAD_USE_PCH)
|
||||
|
||||
SET_BIN_DIR(Assembly AssemblyApp /Mod/Assembly)
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
#endif
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
// inclusion of the generated files (generated out of JointGroup.xml)
|
||||
#include "JointGroupPy.h"
|
||||
#include "JointGroupPy.cpp"
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
/****************************************************************************
|
||||
* *
|
||||
* Copyright (c) 2023 Ondsel <development@ondsel.com> *
|
||||
* *
|
||||
* 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 *
|
||||
* <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
@@ -26,8 +26,6 @@
|
||||
|
||||
#include <FCConfig.h>
|
||||
|
||||
#ifdef _PreComp_
|
||||
|
||||
// standard
|
||||
#include <cinttypes>
|
||||
#include <cmath>
|
||||
@@ -48,5 +46,4 @@
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
|
||||
#endif // _PreComp_
|
||||
#endif // ASSEMBLY_PRECOMPILED_H
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
#endif
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
// inclusion of the generated files (generated out of SimulationGroup.xml)
|
||||
#include "SimulationGroupPy.h"
|
||||
#include "SimulationGroupPy.cpp"
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
#endif
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
// inclusion of the generated files (generated out of ViewGroup.xml)
|
||||
#include "ViewGroupPy.h"
|
||||
#include "ViewGroupPy.cpp"
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Interpreter.h>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <Base/Interpreter.h>
|
||||
|
||||
|
||||
@@ -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
|
||||
$<$<COMPILE_LANGUAGE:CXX>:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h">
|
||||
)
|
||||
endif(FREECAD_USE_PCH)
|
||||
|
||||
target_include_directories(
|
||||
AssemblyGui
|
||||
PRIVATE
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
/****************************************************************************
|
||||
* *
|
||||
* Copyright (c) 2023 Ondsel <development@ondsel.com> *
|
||||
* *
|
||||
* 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 *
|
||||
* <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#include <FCConfig.h>
|
||||
|
||||
#ifdef _PreComp_
|
||||
|
||||
// STL
|
||||
#include <algorithm>
|
||||
@@ -48,6 +47,5 @@
|
||||
// all of Inventor
|
||||
#include <Gui/InventorAll.h>
|
||||
|
||||
#endif //_PreComp_
|
||||
|
||||
#endif // ASSEMBLYGUI_PRECOMPILED_H
|
||||
|
||||
@@ -21,10 +21,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
#endif
|
||||
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/BitmapFactory.h>
|
||||
#include <Gui/Command.h>
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <QMessageBox>
|
||||
#include <QTimer>
|
||||
@@ -38,7 +36,7 @@
|
||||
#include <Inventor/nodes/SoTransform.h>
|
||||
#include <Inventor/sensors/SoFieldSensor.h>
|
||||
#include <Inventor/sensors/SoSensor.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <chrono>
|
||||
|
||||
|
||||
@@ -21,15 +21,13 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
|
||||
#include <App/Link.h>
|
||||
#include <App/Document.h>
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <Base/Interpreter.h>
|
||||
#include <Base/PlacementPy.h>
|
||||
|
||||
@@ -21,11 +21,9 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
#include <vector>
|
||||
#endif
|
||||
|
||||
|
||||
#include <App/Document.h>
|
||||
#include <App/DocumentObject.h>
|
||||
|
||||
@@ -21,11 +21,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
#endif
|
||||
|
||||
#include <App/Document.h>
|
||||
#include <App/DocumentObject.h>
|
||||
#include <Gui/Application.h>
|
||||
|
||||
@@ -21,11 +21,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
#endif
|
||||
|
||||
#include <App/Document.h>
|
||||
#include <App/DocumentObject.h>
|
||||
#include <Gui/Application.h>
|
||||
|
||||
@@ -21,11 +21,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
#endif
|
||||
|
||||
#include <App/Document.h>
|
||||
#include <App/DocumentObject.h>
|
||||
#include <Gui/Application.h>
|
||||
|
||||
@@ -21,11 +21,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
#endif
|
||||
|
||||
#include <App/Document.h>
|
||||
#include <App/DocumentObject.h>
|
||||
#include <Gui/Application.h>
|
||||
|
||||
Reference in New Issue
Block a user