]> git.lyx.org Git - features.git/commitdiff
Scons: exclude boost headers only for system boost header files.
authorBo Peng <bpeng@lyx.org>
Wed, 5 Jul 2006 18:48:59 +0000 (18:48 +0000)
committerBo Peng <bpeng@lyx.org>
Wed, 5 Jul 2006 18:48:59 +0000 (18:48 +0000)
* 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
development/scons/SConstruct

index 8ff95a9f5c2c47229e5e7122b8d2c46d21a317ac..8554a833d719e8a3a8498c763346bb37456fc2fa 100644 (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:
index 07c8cbbe1412858c3c13d7f1ef73398b2b5a5f15..19fbfd3f8b1c247bd7e80533deaf91bb3d7d55c5 100644 (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: