From 734ea8819ef2372aac55009cf3fc2302253b18e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20K=C3=BCmmel?= Date: Wed, 1 Nov 2006 14:32:17 +0000 Subject: [PATCH] enable precompile headers only for the Debug and Release build git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15663 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/cmake/CMakeLists.txt | 4 +++- development/cmake/config.h.cmake | 8 +------- development/cmake/pcheaders.h | 11 ++++++++++- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/development/cmake/CMakeLists.txt b/development/cmake/CMakeLists.txt index f661eaa3a9..3ebe53bd78 100644 --- a/development/cmake/CMakeLists.txt +++ b/development/cmake/CMakeLists.txt @@ -97,9 +97,11 @@ if(MSVC AND NOT disable-pch) macro(lyx_add_msvc_pch name_) SET_SOURCE_FILES_PROPERTIES(${${name_}_sources} PROPERTIES COMPILE_FLAGS "/Yuconfig.h /Fp\$(IntDir)/config.pch") SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/config_pch.C PROPERTIES COMPILE_FLAGS "/Ycconfig.h /Fp\$(IntDir)/config.pch") - add_definitions(/DLYX_PRECOMPILED_HEADERS) set(${name_}_sources ${${name_}_sources} ${CMAKE_BINARY_DIR}/config_pch.C ${CMAKE_BINARY_DIR}/pcheaders.h) endmacro(lyx_add_msvc_pch) + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DLYX_PCH_STL /DLYX_PCH_BOOST /DLYX_PCH_QT4") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /DLYX_PCH_STL /DLYX_PCH_BOOST /DLYX_PCH_QT4") + else(MSVC AND NOT disable-pch) set(disable-pch TRUE CACHE TYPE STRING) macro(lyx_add_msvc_pch) diff --git a/development/cmake/config.h.cmake b/development/cmake/config.h.cmake index 62008f7bf1..74b097e3b1 100644 --- a/development/cmake/config.h.cmake +++ b/development/cmake/config.h.cmake @@ -168,12 +168,6 @@ #pragma warning( disable : 4800 ) //: forcing value to bool 'true' or 'false' (performance warning) #endif -#ifdef LYX_PRECOMPILED_HEADERS -# include "pcheaders.h" -# ifdef LYX_BUILD_QT4_FRONTEND -# include -# include -# endif -#endif +#include "pcheaders.h" #endif diff --git a/development/cmake/pcheaders.h b/development/cmake/pcheaders.h index b4239847db..228efefdef 100644 --- a/development/cmake/pcheaders.h +++ b/development/cmake/pcheaders.h @@ -10,6 +10,7 @@ */ +#ifdef LYX_PCH_BOOST #include #include #include @@ -34,14 +35,15 @@ #include #include #include - #if BOOST_VERSION < 103300 # include #else # include #endif +#endif +#ifdef LYX_PCH_STL #include #include #include @@ -69,3 +71,10 @@ #include #include #include +#endif + + +#if defined(LYX_PCH_QT4) && defined(LYX_BUILD_QT4_FRONTEND) +#include +#include +#endif