Boost logo

Boost Users :

From: David Baird (dhbaird_at_[hidden])
Date: 2007-02-26 14:57:47


Hi,

I'm interested in helping make the BGL easier to use right
out-of-the-box. But, I'm not an expert at Boost (or Jamfiles) yet, so
please guide me if this is wrong. I tried to patch the Jamfile so
that it automatically builds the Graphgiz parser libraries
(libbgl-viz.so and libbgl-viz.a). I only tested Jamfile (not
Jamfile.v2) on some Gentoo boxes with gcc-4.1.1 and gcc-3.3.5 and it
worked nicely.

Some other future improvements I would like to do are to improve the
Graphviz parser (to be able to parse more varieties of .dot files) and
to review the documentation and check it for correctness (I already
submitted some patches about half a year ago for a couple mistakes
that I found). Please let me know what you think.

Without further ado, here's the patch:

Index: boost_1_33_1/libs/graph/build/Jamfile
===================================================================
--- boost_1_33_1.orig/libs/graph/build/Jamfile
+++ boost_1_33_1/libs/graph/build/Jamfile
@@ -33,6 +33,21 @@ GRAPHVIZ_DEFS(graphviz_digraph_parser) =
     }
     local gGENERATOR_FUNCTION(LIB) = bgl-lib-file ;

+ dll bgl-viz
+ : ../src/$(SOURCES).cpp
+ : <sysinclude>$(BOOST_ROOT) <define>YY_NO_UNISTD_H
+ <runtime-link>dynamic
+ <define>BOOST_ALL_DYN_LINK=1
+ # Darwin compiler ICEs if we turn optimization on
+ <darwin><*><debug-symbols>off
+ <darwin><*><optimization>off
+ # Intel compiler ICEs if we turn optimization on
+ <intel-win32><*><optimization>off
+ <vc-7_1><*><cxxflags>-GR-
+ : debug <inlining>on #inlining prevents linker name clashes
due to truncation!
+ <debug-symbols>off # Debugging symbols become HUGE
+ ;
+
     lib bgl-viz
         : ../src/$(SOURCES).cpp
         : <sysinclude>$(BOOST_ROOT) <define>YY_NO_UNISTD_H
@@ -47,4 +62,7 @@ GRAPHVIZ_DEFS(graphviz_digraph_parser) =

         ;

+ install bgl-viz lib
+ : <dll>bgl-viz <lib>bgl-viz
+ ;
 }
Index: boost_1_33_1/libs/graph/build/Jamfile.v2
===================================================================
--- boost_1_33_1.orig/libs/graph/build/Jamfile.v2
+++ boost_1_33_1/libs/graph/build/Jamfile.v2
@@ -24,3 +24,5 @@ obj graphviz_digraph_lex : graphviz_lex.
       <implicit-dependency>graphviz_digraph_parser ;
 obj graphviz_digraph_parser : graphviz_parser.yy
     : <bison.prefix>bgl_dir_ <define>GRAPHVIZ_DIRECTED=1 ;
+
+boost-install bgl-viz ;


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net