Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51134 - in sandbox/SCons: libs/graph/build tools/scons
From: loonycyborg_at_[hidden]
Date: 2009-02-09 07:28:06


Author: loonycyborg
Date: 2009-02-09 07:28:05 EST (Mon, 09 Feb 2009)
New Revision: 51134
URL: http://svn.boost.org/trac/boost/changeset/51134

Log:
Added support for building Boost.Graph

Added:
   sandbox/SCons/libs/graph/build/SConscript (contents, props changed)
Text files modified:
   sandbox/SCons/tools/scons/boost-configure.py | 15 +++++++++++++--
   1 files changed, 13 insertions(+), 2 deletions(-)

Added: sandbox/SCons/libs/graph/build/SConscript
==============================================================================
--- (empty file)
+++ sandbox/SCons/libs/graph/build/SConscript 2009-02-09 07:28:05 EST (Mon, 09 Feb 2009)
@@ -0,0 +1,15 @@
+# vi: syntax=python:et:ts=4
+Import("env")
+
+if env.CheckExpat():
+ graphml = "graphml.cpp"
+else:
+ graphml = []
+
+env.BoostLibrary(
+ "graph",
+ [
+ "read_graphviz_spirit.cpp",
+ graphml
+ ]
+ )

Modified: sandbox/SCons/tools/scons/boost-configure.py
==============================================================================
--- sandbox/SCons/tools/scons/boost-configure.py (original)
+++ sandbox/SCons/tools/scons/boost-configure.py 2009-02-09 07:28:05 EST (Mon, 09 Feb 2009)
@@ -9,9 +9,10 @@
         self.__name__ = str(self.__class__).split(".")[-1]
     def __call__(self, env):
         if not self.checked:
+ conf_env = env.Clone()
             build_dir = "#/bin.SCons/"
- self.conf = env.Configure(conf_dir = build_dir + "sconf_temp", log_file = build_dir + "config.log")
- self.Check(env)
+ self.conf = conf_env.Configure(conf_dir = build_dir + "sconf_temp", log_file = build_dir + "config.log")
+ self.Check(conf_env)
             self.conf.Finish()
             self.checked = True
         if(self.have_dep):
@@ -55,12 +56,22 @@
         except:
             self.have_dep = False
 
+class CheckExpat(DependencyChecker):
+ def Check(self, env):
+ try:
+ self.flags = dict(LIBS = ["expat"])
+ env.AppendUnique(**self.flags)
+ self.have_dep = self.conf.CheckLibWithHeader("expat", "expat.h", "c", autoadd = False)
+ except:
+ self.have_dep = False
+
 def generate(env):
     env.AddMethod(CheckZLib())
     env.AddMethod(CheckBZip2())
     env.AddMethod(CheckPython())
     env.AddMethod(CheckMPI())
     env.AddMethod(CheckICU())
+ env.AddMethod(CheckExpat())
 
 def exists():
     return True


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk