[Test] enable precompiled headers

- also remove unused headers
This commit is contained in:
Uwe
2022-12-14 03:56:01 +01:00
parent f1a836b82a
commit 4531349539
6 changed files with 15 additions and 38 deletions

View File

@@ -22,13 +22,14 @@
#include "PreCompiled.h"
#include "UnitTestPy.h"
#include "UnitTestImp.h"
#include <Gui/Language/Translator.h>
#include <Base/Console.h>
#include <Base/ConsoleObserver.h>
#include <Base/Interpreter.h>
#include <Gui/Language/Translator.h>
#include "UnitTestImp.h"
#include "UnitTestPy.h"
class ILoggerBlockerTest : public Base::ILogger
{

View File

@@ -47,6 +47,12 @@ SET(TestGuiIcon_SVG
Resources/icons/TestWorkbench.svg
)
if(FREECAD_USE_PCH)
add_definitions(-D_PreComp_)
GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${TestGui_SRCS})
ADD_MSVC_PRECOMPILED_HEADER(QtUnitGui PreCompiled.h PreCompiled.cpp PCH_SRCS)
endif(FREECAD_USE_PCH)
add_library(QtUnitGui SHARED ${TestGui_SRCS} ${TestGuiPy_SRCS} ${TestGuiIcon_SVG})
target_link_libraries(QtUnitGui ${TestGui_LIBS})

View File

@@ -20,5 +20,4 @@
* *
***************************************************************************/
#include "PreCompiled.h"

View File

@@ -20,7 +20,6 @@
* *
***************************************************************************/
#ifndef __PRECOMPILED_GUI__
#define __PRECOMPILED_GUI__
@@ -35,31 +34,10 @@
# pragma warning( disable : 4786 ) // specifier longer then 255 chars
#endif
// standard
#include <cstdio>
#include <cassert>
// STL
#include <algorithm>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <bitset>
#ifdef FC_OS_WIN32
# include <windows.h>
#endif
// Qt Toolkit
#ifndef __QtAll__
# include <Gui/QtAll.h>
#endif
#include <QApplication>
#include <QEventLoop>
#include <QMessageBox>
#endif //_PreComp_

View File

@@ -20,24 +20,20 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <QMessageBox>
# include <QStyleFactory>
#endif
#include <Base/PyObjectBase.h>
#include <Base/Interpreter.h>
#include <Gui/MainWindow.h>
#include "UnitTestImp.h"
#include "ui_UnitTest.h"
#include "UnitTestPy.h"
using namespace TestGui;
/* TRANSLATOR TestGui::UnitTestDialog */
UnitTestDialog* UnitTestDialog::_instance=nullptr;

View File

@@ -20,16 +20,13 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <QApplication>
# include <QEventLoop>
#endif
#include <Base/PyObjectBase.h>
#include <Base/Exception.h>
#include <Base/Console.h>
#include "UnitTestPy.h"
#include "UnitTestImp.h"