Speeded up compile time

Reworked *_global.h heavy inclusions
This commit is contained in:
Michaël Lemaire 2015-11-18 19:37:00 +01:00
parent 65b4cd150c
commit 6166031c8b
28 changed files with 50 additions and 17 deletions

View file

@ -1,6 +1,7 @@
#include "ColorProfile.h" #include "ColorProfile.h"
#include "PackStream.h" #include "PackStream.h"
#include <cmath>
ColorProfile::ColorProfile() { ColorProfile::ColorProfile() {
setToneMapping(TONE_MAPPING_UNCHARTED, 1.6); setToneMapping(TONE_MAPPING_UNCHARTED, 1.6);

View file

@ -3,6 +3,8 @@
#include "basics_global.h" #include "basics_global.h"
#include <vector>
namespace paysages { namespace paysages {
namespace basics { namespace basics {

View file

@ -1,6 +1,7 @@
#include "Texture2D.h" #include "Texture2D.h"
#include <cassert> #include <cassert>
#include <cmath>
#include "Color.h" #include "Color.h"
#include "PackStream.h" #include "PackStream.h"
#include "PictureWriter.h" #include "PictureWriter.h"

View file

@ -1,6 +1,7 @@
#include "Texture3D.h" #include "Texture3D.h"
#include <cassert> #include <cassert>
#include <cmath>
#include "Color.h" #include "Color.h"
#include "PackStream.h" #include "PackStream.h"
#include "PictureWriter.h" #include "PictureWriter.h"

View file

@ -1,6 +1,7 @@
#include "Texture4D.h" #include "Texture4D.h"
#include <cassert> #include <cassert>
#include <cmath>
#include "Color.h" #include "Color.h"
#include "PackStream.h" #include "PackStream.h"
#include "PictureWriter.h" #include "PictureWriter.h"

View file

@ -1,15 +1,14 @@
#ifndef BASICS_GLOBAL_H #ifndef BASICS_GLOBAL_H
#define BASICS_GLOBAL_H #define BASICS_GLOBAL_H
#include <QtCore/qglobal.h> #include "system_global.h"
#if defined(BASICS_LIBRARY) #if defined(BASICS_LIBRARY)
#define BASICSSHARED_EXPORT Q_DECL_EXPORT #define BASICSSHARED_EXPORT Q_DECL_EXPORT
#else #else
#define BASICSSHARED_EXPORT Q_DECL_IMPORT #define BASICSSHARED_EXPORT Q_DECL_IMPORT
#endif #endif
#include "system_global.h"
namespace paysages { namespace paysages {
namespace basics { namespace basics {
class Vector3; class Vector3;

View file

@ -7,6 +7,7 @@
#include "DiffManager.h" #include "DiffManager.h"
#include <cassert> #include <cassert>
#include <algorithm>
DefinitionNode::DefinitionNode(DefinitionNode *parent, const std::string &name, const std::string &type_name) DefinitionNode::DefinitionNode(DefinitionNode *parent, const std::string &name, const std::string &type_name)
: parent(parent), type_name(type_name), name(name) { : parent(parent), type_name(type_name), name(name) {

View file

@ -3,6 +3,8 @@
#include "definition_global.h" #include "definition_global.h"
#include <vector>
namespace paysages { namespace paysages {
namespace definition { namespace definition {

View file

@ -1,5 +1,6 @@
#include "DiffManager.h" #include "DiffManager.h"
#include <algorithm>
#include "DefinitionNode.h" #include "DefinitionNode.h"
#include "DefinitionDiff.h" #include "DefinitionDiff.h"
#include "DefinitionWatcher.h" #include "DefinitionWatcher.h"

View file

@ -1,6 +1,7 @@
#include "PaintedGrid.h" #include "PaintedGrid.h"
#include <cassert> #include <cassert>
#include <cmath>
#include "Memory.h" #include "Memory.h"
#include "Interpolation.h" #include "Interpolation.h"
#include "PaintedGridData.h" #include "PaintedGridData.h"

View file

@ -1,5 +1,6 @@
#include "TerrainDefinition.h" #include "TerrainDefinition.h"
#include <cmath>
#include "TerrainHeightMap.h" #include "TerrainHeightMap.h"
#include "NoiseGenerator.h" #include "NoiseGenerator.h"
#include "PackStream.h" #include "PackStream.h"

View file

@ -1,7 +1,7 @@
#ifndef DEFINITION_GLOBAL_H #ifndef DEFINITION_GLOBAL_H
#define DEFINITION_GLOBAL_H #define DEFINITION_GLOBAL_H
#include <QtCore/qglobal.h> #include "basics_global.h"
#if defined(DEFINITION_LIBRARY) #if defined(DEFINITION_LIBRARY)
#define DEFINITIONSHARED_EXPORT Q_DECL_EXPORT #define DEFINITIONSHARED_EXPORT Q_DECL_EXPORT
@ -9,8 +9,6 @@
#define DEFINITIONSHARED_EXPORT Q_DECL_IMPORT #define DEFINITIONSHARED_EXPORT Q_DECL_IMPORT
#endif #endif
#include "basics_global.h"
namespace paysages { namespace paysages {
namespace definition { namespace definition {
class DefinitionNode; class DefinitionNode;

View file

@ -1,7 +1,7 @@
#ifndef OPENGL_GLOBAL_H #ifndef OPENGL_GLOBAL_H
#define OPENGL_GLOBAL_H #define OPENGL_GLOBAL_H
#include <QtCore/qglobal.h> #include "software_global.h"
#if defined(OPENGL_LIBRARY) #if defined(OPENGL_LIBRARY)
#define OPENGLSHARED_EXPORT Q_DECL_EXPORT #define OPENGLSHARED_EXPORT Q_DECL_EXPORT
@ -9,8 +9,6 @@
#define OPENGLSHARED_EXPORT Q_DECL_IMPORT #define OPENGLSHARED_EXPORT Q_DECL_IMPORT
#endif #endif
#include "software_global.h"
namespace paysages { namespace paysages {
namespace opengl { namespace opengl {
class WidgetExplorer; class WidgetExplorer;

View file

@ -3,6 +3,8 @@
#include "software_global.h" #include "software_global.h"
#include <vector>
namespace paysages { namespace paysages {
namespace software { namespace software {

View file

@ -7,6 +7,7 @@
#include "BaseCloudLayerRenderer.h" #include "BaseCloudLayerRenderer.h"
#include "CloudBasicLayerRenderer.h" #include "CloudBasicLayerRenderer.h"
#include "CameraDefinition.h" #include "CameraDefinition.h"
#include "Logs.h"
#include "clouds/BaseCloudsModel.h" #include "clouds/BaseCloudsModel.h"
#include "clouds/CloudModelAltoCumulus.h" #include "clouds/CloudModelAltoCumulus.h"
@ -99,7 +100,7 @@ BaseCloudLayerRenderer *CloudsRenderer::getLayerRenderer(unsigned int layer) {
if (layer < layer_renderers.size()) { if (layer < layer_renderers.size()) {
return layer_renderers[layer]; return layer_renderers[layer];
} else { } else {
qWarning("Asked for unknown layer renderer %d", layer); Logs::warning() << "Asked for unknown layer renderer " << layer << std::endl;
return fake_renderer; return fake_renderer;
} }
} }
@ -108,7 +109,7 @@ BaseCloudsModel *CloudsRenderer::getLayerModel(unsigned int layer) {
if (layer < layer_models.size()) { if (layer < layer_models.size()) {
return layer_models[layer]; return layer_models[layer];
} else { } else {
qWarning("Asked for unknown layer model %d", layer); Logs::warning() << "Asked for unknown layer model" << layer << std::endl;
return fake_model; return fake_model;
} }
} }
@ -120,7 +121,7 @@ void CloudsRenderer::setLayerModel(unsigned int layer, BaseCloudsModel *model, b
} }
layer_models[layer] = model; layer_models[layer] = model;
} else { } else {
qWarning("Asked to set an unknown layer model %d", layer); Logs::warning() << "Asked to set an unknown layer model" << layer << std::endl;
delete model; delete model;
} }
} }

View file

@ -5,6 +5,8 @@
#include "LightFilter.h" #include "LightFilter.h"
#include <vector>
namespace paysages { namespace paysages {
namespace software { namespace software {

View file

@ -5,6 +5,8 @@
#include "SpaceSegment.h" #include "SpaceSegment.h"
#include <vector>
namespace paysages { namespace paysages {
namespace software { namespace software {

View file

@ -1,5 +1,7 @@
#include "GodRaysResult.h" #include "GodRaysResult.h"
#include <cmath>
GodRaysResult::GodRaysResult(double inside_length, double full_length) GodRaysResult::GodRaysResult(double inside_length, double full_length)
: inside_length(inside_length), full_length(full_length) { : inside_length(inside_length), full_length(full_length) {
} }

View file

@ -3,6 +3,8 @@
#include "software_global.h" #include "software_global.h"
#include <vector>
namespace paysages { namespace paysages {
namespace software { namespace software {

View file

@ -5,6 +5,8 @@
#include "LightComponent.h" #include "LightComponent.h"
#include <vector>
namespace paysages { namespace paysages {
namespace software { namespace software {

View file

@ -1,5 +1,6 @@
#include "LightingManager.h" #include "LightingManager.h"
#include <algorithm>
#include "LightFilter.h" #include "LightFilter.h"
#include "LightComponent.h" #include "LightComponent.h"
#include "LightStatus.h" #include "LightStatus.h"

View file

@ -5,6 +5,8 @@
#include "LightComponent.h" #include "LightComponent.h"
#include <vector>
namespace paysages { namespace paysages {
namespace software { namespace software {

View file

@ -5,6 +5,8 @@
#include "SoftwareRenderer.h" #include "SoftwareRenderer.h"
#include <vector>
namespace paysages { namespace paysages {
namespace software { namespace software {

View file

@ -1,7 +1,7 @@
#ifndef SOFTWARE_GLOBAL_H #ifndef SOFTWARE_GLOBAL_H
#define SOFTWARE_GLOBAL_H #define SOFTWARE_GLOBAL_H
#include <QtCore/qglobal.h> #include "definition_global.h"
#if defined(SOFTWARE_LIBRARY) #if defined(SOFTWARE_LIBRARY)
#define SOFTWARESHARED_EXPORT Q_DECL_EXPORT #define SOFTWARESHARED_EXPORT Q_DECL_EXPORT
@ -9,8 +9,6 @@
#define SOFTWARESHARED_EXPORT Q_DECL_IMPORT #define SOFTWARESHARED_EXPORT Q_DECL_IMPORT
#endif #endif
#include "definition_global.h"
namespace paysages { namespace paysages {
namespace software { namespace software {
class SoftwareRenderer; class SoftwareRenderer;

View file

@ -1,5 +1,6 @@
#include "Memory.h" #include "Memory.h"
#include <string>
#include <cstring> #include <cstring>
#include <cassert> #include <cassert>

View file

@ -5,6 +5,7 @@
class QFile; class QFile;
class QDataStream; class QDataStream;
class QByteArray;
namespace paysages { namespace paysages {
namespace system { namespace system {

View file

@ -3,6 +3,8 @@
#include "system_global.h" #include "system_global.h"
#include <vector>
namespace paysages { namespace paysages {
namespace system { namespace system {

View file

@ -1,11 +1,17 @@
#ifndef SYSTEM_GLOBAL_H #ifndef SYSTEM_GLOBAL_H
#define SYSTEM_GLOBAL_H #define SYSTEM_GLOBAL_H
#ifndef __MINGW32__ #include <string>
#ifdef __MINGW32__
#define Q_DECL_EXPORT __declspec(dllexport)
#define Q_DECL_IMPORT __declspec(dllimport)
#else
#define PAYSAGES_USE_INLINING 1 #define PAYSAGES_USE_INLINING 1
#define Q_DECL_EXPORT __attribute__((visibility("default")))
#define Q_DECL_IMPORT __attribute__((visibility("default")))
#endif #endif
#include <QtCore/qglobal.h>
#if defined(SYSTEM_LIBRARY) #if defined(SYSTEM_LIBRARY)
#define SYSTEMSHARED_EXPORT Q_DECL_EXPORT #define SYSTEMSHARED_EXPORT Q_DECL_EXPORT
#else #else