Add proper use of precompiled headers on linux - this removes an approx 50% reduction of total compiletime
--HG-- branch : trunk
This commit is contained in:
+10
-2
@@ -1,5 +1,7 @@
|
||||
|
||||
########### next target ###############
|
||||
# Enable precompiled headers when using the GCC compiler.
|
||||
IF(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
||||
ENDIF(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
SET(game_STAT_SRCS
|
||||
AccountMgr.cpp
|
||||
@@ -317,6 +319,7 @@ include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src/shared
|
||||
${CMAKE_SOURCE_DIR}/src/shared/vmap
|
||||
${CMAKE_SOURCE_DIR}/src/shared/Database
|
||||
${CMAKE_SOURCE_DIR}/src/game
|
||||
${MYSQL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
@@ -343,3 +346,8 @@ endif(NOT DO_SCRIPTS)
|
||||
add_library(game STATIC ${game_STAT_SRCS})
|
||||
ADD_DEPENDENCIES(game revision.h)
|
||||
|
||||
# Generate precompiled header
|
||||
IF(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX)
|
||||
ADD_PRECOMPILED_HEADER(game ${CMAKE_SOURCE_DIR}/src/game/pchlinux.h)
|
||||
ENDIF(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
#include "pchdef.h"
|
||||
@@ -0,0 +1,12 @@
|
||||
//add here most rarely modified headers to speed up debug build compilation
|
||||
#include "WorldSocket.h" // must be first to make ACE happy with ACE includes in it
|
||||
#include "Common.h"
|
||||
|
||||
#include "MapManager.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectDefines.h"
|
||||
#include "Database/SQLStorage.h"
|
||||
#include "Opcodes.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "ObjectMgr.h"
|
||||
Reference in New Issue
Block a user