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
This commit is contained in:
Bo Peng 2006-07-05 18:48:59 +00:00
parent da9cdaf218
commit a54d3e83bd
2 changed files with 21 additions and 7 deletions

View File

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

View File

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