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
This commit is contained in:
Peter Kümmel 2006-11-01 14:32:17 +00:00
parent c1106b1d06
commit 734ea8819e
3 changed files with 14 additions and 9 deletions

View File

@ -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)

View File

@ -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 <QtCore>
# include <QtGUI>
# endif
#endif
#include "pcheaders.h"
#endif

View File

@ -10,6 +10,7 @@
*/
#ifdef LYX_PCH_BOOST
#include <boost/any.hpp>
#include <boost/array.hpp>
#include <boost/assert.hpp>
@ -34,14 +35,15 @@
#include <boost/tuple/tuple.hpp>
#include <boost/utility.hpp>
#include <boost/version.hpp>
#if BOOST_VERSION < 103300
# include <boost/test/detail/nullstream.hpp>
#else
# include <boost/test/utils/nullstream.hpp>
#endif
#endif
#ifdef LYX_PCH_STL
#include <algorithm>
#include <cerrno>
#include <cassert>
@ -69,3 +71,10 @@
#include <string>
#include <utility>
#include <vector>
#endif
#if defined(LYX_PCH_QT4) && defined(LYX_BUILD_QT4_FRONTEND)
#include <QtCore>
#include <QtGUI>
#endif