add MinSizeRel as project which only uses STL and Boost pchs

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15674 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2006-11-01 16:11:28 +00:00
parent f49f2f6e22
commit 94792c0821
3 changed files with 10 additions and 2 deletions

View File

@ -98,9 +98,11 @@ if(MSVC AND NOT disable-pch)
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")
set(${name_}_sources ${${name_}_sources} ${CMAKE_BINARY_DIR}/config_pch.C ${CMAKE_BINARY_DIR}/pcheaders.h)
add_definitions(/DLYX_ENABLE_PCH)
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")
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")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /DLYX_PCH_STL /DLYX_PCH_BOOST")
else(MSVC AND NOT disable-pch)
set(disable-pch TRUE CACHE TYPE STRING)

View File

@ -23,6 +23,10 @@ Building Visual C++ 2005 project files:
TIPS: - rename Microsoft Visual Studio 8\VC\vcpackages\feacp.dll
to disable Intellisense
- the Release build links much faster
- for the Debug and Release build all precompiled headers are enabled
to compile without pch (to check if all necessary headers are included)
* use MinSizeRel which only precompiles the STL and Boost headers
* use RelWithDebInfo which does not use any precompiled headers
Building with GCC/Linux:

View File

@ -168,6 +168,8 @@
#pragma warning( disable : 4800 ) //: forcing value to bool 'true' or 'false' (performance warning)
#endif
#ifdef LYX_ENABLE_PCH
#include "pcheaders.h"
#endif
#endif