From d607693123ce3f128d36f7bfd0bdc6a858ef9305 Mon Sep 17 00:00:00 2001 From: click Date: Tue, 18 May 2010 00:17:14 +0200 Subject: Add proper use of precompiled headers on linux - this removes an approx 50% reduction of total compiletime --HG-- branch : trunk --- src/scripts/CMakeLists.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/scripts') diff --git a/src/scripts/CMakeLists.txt b/src/scripts/CMakeLists.txt index 54627091ec2..e51130881f6 100644 --- a/src/scripts/CMakeLists.txt +++ b/src/scripts/CMakeLists.txt @@ -1,11 +1,13 @@ - -########### 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(scripts_STAT_SRCS - ../game/ScriptedEscortAI.cpp - ../game/ScriptedEscortAI.h ../game/ScriptedPch.cpp ../game/ScriptedPch.h + ../game/ScriptedEscortAI.cpp + ../game/ScriptedEscortAI.h ../game/ScriptedCreature.cpp ../game/ScriptedCreature.h ../game/ScriptedFollowerAI.cpp @@ -586,3 +588,7 @@ include_directories( add_library(scripts STATIC ${scripts_STAT_SRCS}) +# Generate precompiled header +IF(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX) + ADD_PRECOMPILED_HEADER(scripts ${CMAKE_SOURCE_DIR}/src/game/ScriptedPch.h) +ENDIF(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX) -- cgit v1.2.3