Update of /cvsroot/boost/boost/libs/thread/example
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32578

Modified Files:
      Tag: thread_rewrite
        Jamfile 
Added Files:
      Tag: thread_rewrite
        Jamrules boost-build.jam 
Log Message:
Allow examples to be built out of boost source tree.


--- NEW FILE: Jamrules ---
# Copyright 2006 Roland Schwarz.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
# This work is a reimplementation along the design and ideas
# of William E. Kempf.

project example ;

# If you move this example from its place in the Boost tree, edit this
# path to point at the root directory of your Boost installation (the
# one containing a subdirectory called "boost/".
path-global BOOST_ROOT : ../../.. ;
# Makes a project id for boost so that other Boost.Build projects can
# refer to it by name.
#
project boost : $(BOOST_ROOT) ;

# Attn: path-global was broken in my version of bbv1, so I did not use it.
# if you want to fix it, you'd need to fix the project rule in 
# allyourbase.jam as shown below:
#
#rule project ( name : location ? )
#{
#    if ! $(location)
#    {
#       gPROJECT($(name)) = $(gPROJECT($(PROJECT))) ;
#       PROJECT($(gPROJECT($(name)))) = $(name) ;
#       PROJECT = $(name) ;
#    }
#    else
#    {
#        gPROJECT($(name)) = [ root-paths $(location) : [ root-paths $($(gTOP)) 
: [ PWD ] ] ] ;
#        # speedsnail
#        # Root the path globals to fix a bug which prevented to use them from 
an external
#        # project. The fix is as as uninvasive as possible, as it will only 
trigger when
#        # an external project is declared. So it will not interfere with the 
build of the
#        # boost library. I took this route, as at the time of this fix, the 
bbv1 is expected
#        # to be retired soon.
#        # N.B.: The path-globals rule is expected to be invoked from Jamrules 
files only.
#        local val ;
#        for val in $(gPATH_GLOBALS) {
#        gPATH_GLOBAL_VALUE($(val)) = [ root-paths 
$(gPATH_GLOBAL_VALUE($(val))) :
#                                            [ root-paths $($(gTOP)) : [ PWD ]  
]
#                                     ] ;
#        }
#        local [ protect-subproject ] ;
#        enter-subproject @$(name) ;
#     }
#}

--- NEW FILE: boost-build.jam ---
# Copyright 2006 Roland Schwarz.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
# This work is a reimplementation along the design and ideas
# of William E. Kempf.
#

# Edit this path to point at the tools/build/v1 subdirectory of your
# Boost installation. 

if --v2 in $(ARGV)
{
    JAMFILE = [Bb]uild.jam [Jj]amfile.v2 ;
    boost-build ../../../tools/build/v2 ;
}
else
{
    boost-build ../../../tools/build/v1 ;
}


Index: Jamfile
===================================================================
RCS file: /cvsroot/boost/boost/libs/thread/example/Jamfile,v
retrieving revision 1.15
retrieving revision 1.15.10.1
diff -u -d -r1.15 -r1.15.10.1
--- Jamfile     19 Feb 2004 01:16:06 -0000      1.15
+++ Jamfile     17 Jul 2006 10:19:36 -0000      1.15.10.1
@@ -1,54 +1,45 @@
-# Copyright (C) 2001-2003
-# William E. Kempf
-#
-# Permission to use, copy, modify, distribute and sell this software
-# and its documentation for any purpose is hereby granted without fee,
-# provided that the above copyright notice appear in all copies and
-# that both that copyright notice and this permission notice appear
-# in supporting documentation.  William E. Kempf makes no representations
-# about the suitability of this software for any purpose.
-# It is provided "as is" without express or implied warranty.
-#
-# Boost.Threads example Jamfile
+# Copyright 2006 Roland Schwarz.
+# # Distributed under the Boost Software License, Version 1.0. (See
+# # accompanying file LICENSE_1_0.txt or copy at
+# # http://www.boost.org/LICENSE_1_0.txt)
+# #
+# # This work is a reimplementation along the design and ideas
+# # of William E. Kempf.
 #
-# Additional configuration variables used:
-#   1. PTW32 may be used on Win32 platforms to specify that the pthreads-win32
-#      library should be used instead of "native" threads. This feature is
-#      mostly used for testing and it's generally recommended you use the
-#      native threading libraries instead. PTW32 should be set to be a list
-#      of two strings, the first specifying the installation path of the
-#      pthreads-win32 library and the second specifying which library
-#      variant to link against (see the pthreads-win32 documentation).
-#      Example: jam -sPTW32="c:\pthreads-win32 pthreadVCE.lib"
 
-# Declare the location of this subproject relative to the root.
-subproject libs/thread/example ;
+# The threading library is available in two versions.
+# Native to the environment and based upon pthread.
+# To select which version to use you need to define
+# BOOST_THREAD_POSIX when compiling your sources.
+# If BOOST_THREAD_POSIX is defined this will choose
+# pthread implementation.
+# You also need to compile the correct library version by
+# specifying the the <lib> or <dll> tags.
+# <lib>@boost/libs/thread/build/boost_thread for static native and
+# <lib>@boost/libs/thread/build/boost_thread_pthread static pthread.
+# 
 
-# Include threads.jam for Boost.Threads global build information.
-# This greatly simplifies the Jam code needed to configure the build
-# for the various Win32 build types.
-import ../build/threads ;
+project-root ;
 
-{
-    template example
-        ## sources ##
-        : <template>thread_base
-          <dll>../build/boost_thread
-        ## requirements ##
-        :
-        ## default build ##
-        :
-    ;
+template example
+        : ## sources ##
+         <template>@boost/libs/thread/build/includes
+         #<lib>@boost/libs/thread/build/boost_thread
+         <lib>@boost/libs/thread/build/boost_thread_pthread
+        : ## requirements ##
+         <define>BOOST_THREAD_POSIX
+        : ## default build ##
+          <threading>multi
+       ;
 
-    exe monitor : <template>example monitor.cpp ;
-    exe starvephil : <template>example starvephil.cpp ;
-    exe tennis : <template>example tennis.cpp ;
-    exe condition : <template>example condition.cpp ;
-    exe mutex : <template>example mutex.cpp ;
-    exe once : <template>example once.cpp ;
-    exe recursive_mutex : <template>example recursive_mutex.cpp ;
-    exe thread : <template>example thread.cpp ;
-    exe thread_group : <template>example thread_group.cpp ;
-    exe tss : <template>example tss.cpp ;
-    exe xtime : <template>example xtime.cpp ;
-}
+#exe monitor : <template>example monitor.cpp ;
+#exe starvephil : <template>example starvephil.cpp ;
+#exe tennis : <template>example tennis.cpp ;
+#exe condition : <template>example condition.cpp ;
+#exe mutex : <template>example mutex.cpp ;
+#exe once : <template>example once.cpp ;
+#exe recursive_mutex : <template>example recursive_mutex.cpp ;
+exe thread : <template>example thread.cpp ;
+#exe thread_group : <template>example thread_group.cpp ;
+#exe tss : <template>example tss.cpp ;
+#exe xtime : <template>example xtime.cpp ;



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to