mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-10 02:08:20 +00:00
Implement Precompiled Headers (#591)
When applied, this will speed up compile times dramatically.
This commit is contained in:
parent
6e2936504c
commit
8a54e7ccd2
@ -240,6 +240,35 @@ ${PROJECT_SOURCE_DIR}/dDatabase/*.cpp
|
|||||||
${PROJECT_SOURCE_DIR}/dDatabase/Tables/*.cpp
|
${PROJECT_SOURCE_DIR}/dDatabase/Tables/*.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
file(
|
||||||
|
GLOB HEADERS_DDATABASE
|
||||||
|
LIST_DIRECTORIES false
|
||||||
|
${PROJECT_SOURCE_DIR}/dDatabase/*.h
|
||||||
|
${PROJECT_SOURCE_DIR}/dDatabase/Tables/*.h
|
||||||
|
${PROJECT_SOURCE_DIR}/thirdparty/SQLite/*.h
|
||||||
|
)
|
||||||
|
|
||||||
|
file(
|
||||||
|
GLOB HEADERS_DZONEMANAGER
|
||||||
|
LIST_DIRECTORIES false
|
||||||
|
${PROJECT_SOURCE_DIR}/dZoneManager/*.h
|
||||||
|
)
|
||||||
|
|
||||||
|
file(
|
||||||
|
GLOB HEADERS_DCOMMON
|
||||||
|
LIST_DIRECTORIES false
|
||||||
|
${PROJECT_SOURCE_DIR}/dCommon/*.h
|
||||||
|
)
|
||||||
|
|
||||||
|
file(
|
||||||
|
GLOB HEADERS_DGAME
|
||||||
|
LIST_DIRECTORIES false
|
||||||
|
${PROJECT_SOURCE_DIR}/dGame/Entity.h
|
||||||
|
${PROJECT_SOURCE_DIR}/dGame/dGameMessages/GameMessages.h
|
||||||
|
${PROJECT_SOURCE_DIR}/dGame/EntityManager.h
|
||||||
|
${PROJECT_SOURCE_DIR}/dScripts/CppScripts.h
|
||||||
|
)
|
||||||
|
|
||||||
# Source Code for dNet
|
# Source Code for dNet
|
||||||
file(
|
file(
|
||||||
GLOB SOURCES_DNET
|
GLOB SOURCES_DNET
|
||||||
@ -312,6 +341,33 @@ add_executable(AuthServer ${SOURCES_AUTH})
|
|||||||
add_executable(MasterServer ${SOURCES_MASTER})
|
add_executable(MasterServer ${SOURCES_MASTER})
|
||||||
add_executable(ChatServer ${SOURCES_CHAT})
|
add_executable(ChatServer ${SOURCES_CHAT})
|
||||||
|
|
||||||
|
# Add out precompiled headers
|
||||||
|
target_precompile_headers(
|
||||||
|
dGame PRIVATE
|
||||||
|
${HEADERS_DGAME}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_precompile_headers(
|
||||||
|
dZoneManager PRIVATE
|
||||||
|
${HEADERS_DZONEMANAGER}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Need to specify to use the CXX compiler language here or else we get errors including <string>.
|
||||||
|
target_precompile_headers(
|
||||||
|
dDatabase PRIVATE
|
||||||
|
"$<$<COMPILE_LANGUAGE:CXX>:${HEADERS_DDATABASE}>"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_precompile_headers(
|
||||||
|
dCommon PRIVATE
|
||||||
|
${HEADERS_DCOMMON}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_precompile_headers(
|
||||||
|
tinyxml2 PRIVATE
|
||||||
|
"$<$<COMPILE_LANGUAGE:CXX>:${PROJECT_SOURCE_DIR}/thirdparty/tinyxml2/tinyxml2.h>"
|
||||||
|
)
|
||||||
|
|
||||||
# Target libraries to link to:
|
# Target libraries to link to:
|
||||||
target_link_libraries(WorldServer dCommon)
|
target_link_libraries(WorldServer dCommon)
|
||||||
target_link_libraries(WorldServer dChatFilter)
|
target_link_libraries(WorldServer dChatFilter)
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef BEHAVIORSLOT_H
|
||||||
|
#define BEHAVIORSLOT_H
|
||||||
|
|
||||||
enum class BehaviorSlot
|
enum class BehaviorSlot
|
||||||
{
|
{
|
||||||
Invalid = -1,
|
Invalid = -1,
|
||||||
@ -9,3 +12,5 @@ enum class BehaviorSlot
|
|||||||
Head,
|
Head,
|
||||||
Consumable
|
Consumable
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef INVENTORYCOMPONENT_H
|
||||||
|
#define INVENTORYCOMPONENT_H
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
|
||||||
@ -445,3 +448,5 @@ private:
|
|||||||
*/
|
*/
|
||||||
void UpdatePetXml(tinyxml2::XMLDocument* document);
|
void UpdatePetXml(tinyxml2::XMLDocument* document);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef PROPERTYSELECTQUERY_H
|
||||||
|
#define PROPERTYSELECTQUERY_H
|
||||||
|
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
|
|
||||||
class PropertySelectQueryProperty final
|
class PropertySelectQueryProperty final
|
||||||
@ -24,3 +27,5 @@ public:
|
|||||||
float PerformanceCost = 0; // The performance cost of the property
|
float PerformanceCost = 0; // The performance cost of the property
|
||||||
uint32_t PerformanceIndex = 0; // The performance index of the property? Always 0?
|
uint32_t PerformanceIndex = 0; // The performance index of the property? Always 0?
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef INVENTORY_H
|
||||||
|
#define INVENTORY_H
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@ -182,3 +185,5 @@ private:
|
|||||||
*/
|
*/
|
||||||
static std::vector<LOT> m_GameMasterRestrictedItems;
|
static std::vector<LOT> m_GameMasterRestrictedItems;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef MISSION_H
|
||||||
|
#define MISSION_H
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@ -259,3 +262,5 @@ private:
|
|||||||
*/
|
*/
|
||||||
std::vector<MissionTask*> m_Tasks;
|
std::vector<MissionTask*> m_Tasks;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef MISSIONLOCKSTATE_H
|
||||||
|
#define MISSIONLOCKSTATE_H
|
||||||
|
|
||||||
enum class MissionLockState : int
|
enum class MissionLockState : int
|
||||||
{
|
{
|
||||||
MISSION_LOCK_LOCKED,
|
MISSION_LOCK_LOCKED,
|
||||||
MISSION_LOCK_NEW,
|
MISSION_LOCK_NEW,
|
||||||
MISSION_LOCK_UNLOCKED,
|
MISSION_LOCK_UNLOCKED,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef MISSIONTASK_H
|
||||||
|
#define MISSIONTASK_H
|
||||||
|
|
||||||
#include "CDMissionTasksTable.h"
|
#include "CDMissionTasksTable.h"
|
||||||
#include "MissionTaskType.h"
|
#include "MissionTaskType.h"
|
||||||
#include "dCommonVars.h"
|
#include "dCommonVars.h"
|
||||||
@ -180,3 +183,5 @@ private:
|
|||||||
*/
|
*/
|
||||||
void CheckCompletion() const;
|
void CheckCompletion() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef MISSIONTASKTYPE_H
|
||||||
|
#define MISSIONTASKTYPE_H
|
||||||
|
|
||||||
//! An enum for mission task types
|
//! An enum for mission task types
|
||||||
enum class MissionTaskType : int {
|
enum class MissionTaskType : int {
|
||||||
MISSION_TASK_TYPE_UNKNOWN = -1, //!< The task type is unknown
|
MISSION_TASK_TYPE_UNKNOWN = -1, //!< The task type is unknown
|
||||||
@ -24,3 +27,5 @@ enum class MissionTaskType : int {
|
|||||||
MISSION_TASK_TYPE_PLACE_MODEL = 25, //!< A task for picking up a model
|
MISSION_TASK_TYPE_PLACE_MODEL = 25, //!< A task for picking up a model
|
||||||
MISSION_TASK_TYPE_VISIT_PROPERTY = 30 //!< A task for visiting a property
|
MISSION_TASK_TYPE_VISIT_PROPERTY = 30 //!< A task for visiting a property
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Collision Groups
|
* Collision Groups
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user