From a54d3e83bdf9f3be3b1466c63ac6036bce0d0275 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Wed, 5 Jul 2006 18:48:59 +0000 Subject: [PATCH] Scons: exclude boost headers only for system boost header files. * INSTALL.scons: document this change. * development/scons/SConstruct: check for included_boost to exclude boost headers from the dependency tree. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14343 a592a061-630c-0410-9148-cb99ea01b6c8 --- INSTALL.scons | 14 ++++++++++++-- development/scons/SConstruct | 14 +++++++++----- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/INSTALL.scons b/INSTALL.scons index 8ff95a9f5c..8554a833d7 100644 --- a/INSTALL.scons +++ b/INSTALL.scons @@ -20,7 +20,8 @@ This file is organized as follows: 4. Windows/cygwin 5. windows/msvc 6. Other versions of lyx (1.4.x) -7. Troubleshooting +7. Tips and hints +8. Troubleshooting 1. General usage of scons @@ -328,7 +329,16 @@ Note that lyx 1.4.x does not use the latest version of the boost library so option boost=included is recommended. -7. Troubleshooting +7. Tips and hints +================= + + * Using external boost libraries (install boost libraries and use + option boost=system) can speed up scons' starting time a lot, since + the boost headers will then be considered as system headers and will + not be included in the dependency tree. + + +8. Troubleshooting ================== When you get an error: diff --git a/development/scons/SConstruct b/development/scons/SConstruct index 07c8cbbe14..19fbfd3f8b 100644 --- a/development/scons/SConstruct +++ b/development/scons/SConstruct @@ -1311,12 +1311,16 @@ if env['X11']: env['CPPPATH'] += ['$BUILDDIR/common', '$TOP_SRCDIR/src'] # # Separating boost directories from CPPPATH stops scons from building -# the dependency tree of boost header files, and effectively reduce -# the null build time of lyx from 29s to 16s. -if use_vc: - env.AppendUnique(CCFLAGS = ['/I$BOOST_INC_PATH']) +# the dependency tree for boost header files, and effectively reduce +# the null build time of lyx from 29s to 16s. Since lyx may tweak local +# boost headers, this is only done for system boost headers. +if included_boost: + env.AppendUnique(CPPPATH = ['$BOOST_INC_PATH']) else: - env.AppendUnique(CCFLAGS = ['-I$BOOST_INC_PATH']) + if use_vc: + env.PrependUnique(CCFLAGS = ['/I$BOOST_INC_PATH']) + else: + env.PrependUnique(CCFLAGS = ['-I$BOOST_INC_PATH']) # for intl/config.h, intl/libintl.h and intl/libgnuintl.h if env['nls'] and included_gettext: