Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52453 - in sandbox/task: boost/task/detail libs/task/build
From: oliver.kowalke_at_[hidden]
Date: 2009-04-17 15:27:38


Author: olli
Date: 2009-04-17 15:27:36 EDT (Fri, 17 Apr 2009)
New Revision: 52453
URL: http://svn.boost.org/trac/boost/changeset/52453

Log:
* platform.hpp added
* config.hpp enhanced

Added:
   sandbox/task/boost/task/detail/platform.hpp (contents, props changed)
Text files modified:
   sandbox/task/boost/task/detail/bind_processor.hpp | 19 +++++---
   sandbox/task/boost/task/detail/config.hpp | 84 +++++++++++++++++++++++++++++++--------
   sandbox/task/libs/task/build/Jamfile.v2 | 17 ++++---
   3 files changed, 87 insertions(+), 33 deletions(-)

Modified: sandbox/task/boost/task/detail/bind_processor.hpp
==============================================================================
--- sandbox/task/boost/task/detail/bind_processor.hpp (original)
+++ sandbox/task/boost/task/detail/bind_processor.hpp 2009-04-17 15:27:36 EDT (Fri, 17 Apr 2009)
@@ -9,18 +9,23 @@
 
 #include <boost/task/detail/config.hpp>
 
-# if defined(BOOST_WINDOWS_OS)
+# if defined(BOOST_TASK_WIN32)
+# define BOOST_HAS_PROCESSOR_BINDINGS 1
 # include <boost/task/detail/bind_processor_windows.hpp>
-# elif defined(BOOST_LINUX_OS)
+# elif defined(BOOST_TASK_LINUX)
+# define BOOST_HAS_PROCESSOR_BINDINGS 1
 # include <boost/task/detail/bind_processor_linux.hpp>
-//# elif defined(BOOST_xBSD_OS)
-//# include <boost/task/detail/bind_processor_bsd.hpp>
-# elif defined(BOOST_AIX_OS)
+# elif defined(BOOST_TASK_AIX)
+# define BOOST_HAS_PROCESSOR_BINDINGS 1
 # include <boost/task/detail/bind_processor_aix.hpp>
-# elif defined(BOOST_HPUX_OS)
+# elif defined(BOOST_TASK_HPUX)
+# define BOOST_HAS_PROCESSOR_BINDINGS 1
 # include <boost/task/detail/bind_processor_hpux.hpp>
-# elif defined(BOOST_SOLARIS_OS)
+# elif defined(BOOST_TASK_SOLARIS)
+# define BOOST_HAS_PROCESSOR_BINDINGS 1
 # include <boost/task/detail/bind_processor_solaris.hpp>
+# else
+# define BOOST_HAS_PROCESSOR_BINDINGS 0
 # endif
 
 #endif // BOOST_TASK_DETAIL_BIND_PROCESSOR_H

Modified: sandbox/task/boost/task/detail/config.hpp
==============================================================================
--- sandbox/task/boost/task/detail/config.hpp (original)
+++ sandbox/task/boost/task/detail/config.hpp 2009-04-17 15:27:36 EDT (Fri, 17 Apr 2009)
@@ -4,10 +4,27 @@
 // (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
+// this file is based on config.hpp of boost.thread
+
 #ifndef BOOST_TASK_DETAIL_CONFIG_H
 #define BOOST_TASK_DETAIL_CONFIG_H
 
 #include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+# if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
+# pragma warn -8008 // Condition always true/false
+# pragma warn -8080 // Identifier declared but never used
+# pragma warn -8057 // Parameter never used
+# pragma warn -8066 // Unreachable code
+# endif
+
+#include <boost/task/detail/platform.hpp>
+
+# if defined(BOOST_TASK_DYN_DLL) || defined(BOOST_ALL_DYN_LINK)
+# undef BOOST_TASK_USE_LIB
+# define BOOST_TASK_USE_DLL
+# endif
 
 # if defined(BOOST_WINDOWS_API) && defined(BOOST_POSIX_API)
 # error "Both BOOST_WINDOWS_API and BOOST_POSIX_API are defined!"
@@ -19,26 +36,57 @@
 # endif
 # endif
 
-#define BOOST_HAS_PROCESSOR_BINDINGS 0
+# if defined(BOOST_TASK_BUILD_DLL) //Build dll
+# elif defined(BOOST_TASK_BUILD_LIB) //Build lib
+# elif defined(BOOST_TASK_USE_DLL) //Use dll
+# elif defined(BOOST_TASK_USE_LIB) //Use lib
+# else //Use default
+# if defined(BOOST_TASK_PLATFORM_WIN32)
+# if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN)
+ //For compilers supporting auto-tss cleanup
+ //with Boost.Threads lib, use Boost.Threads lib
+# define BOOST_TASK_USE_LIB
+# else
+ //For compilers not yet supporting auto-tss cleanup
+ //with Boost.Threads lib, use Boost.Threads dll
+# define BOOST_TASK_USE_DLL
+# endif
+# else
+# define BOOST_TASK_USE_LIB
+# endif
+# endif
 
-# if defined(BOOST_WINDOWS_API)
-# define BOOST_WINDOWS_OS
-# define BOOST_HAS_PROCESSOR_BINDINGS 1
-# elif defined(linux) || defined(__linux) || defined(__linux__)
-# define BOOST_LINUX_OS
-# define BOOST_HAS_PROCESSOR_BINDINGS 1
-# elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
-# define BOOST_xBSD_OS
-# elif defined(__IBMCPP__) || defined(_AIX)
-# define BOOST_AIX_OS
-# define BOOST_HAS_PROCESSOR_BINDINGS 1
-# elif defined(__hpux)
-# define BOOST_HPUX_OS
-# define BOOST_HAS_PROCESSOR_BINDINGS 1
-# elif defined(sun) || defined(__sun)
-# define BOOST_SOLARIS_OS
-# define BOOST_HAS_PROCESSOR_BINDINGS 1
+# if defined(BOOST_HAS_DECLSPEC)
+# if defined(BOOST_TASK_BUILD_DLL) //Build dll
+# define BOOST_TASK_DECL __declspec(dllexport)
+# elif defined(BOOST_TASK_USE_DLL) //Use dll
+# define BOOST_TASK_DECL __declspec(dllimport)
+# else
+# define BOOST_TASK_DECL
+# endif
+# else
+# define BOOST_TASK_DECL
+# endif
+
+// Automatically link to the correct build variant where possible.
+# if ! defined(BOOST_ALL_NO_LIB) && ! defined(BOOST_TASK_NO_LIB) && ! defined(BOOST_TASK_BUILD_DLL) && ! defined(BOOST_TASK_BUILD_LIB)
+
+// Tell the autolink to link dynamically, this will get undef'ed by auto_link.hpp
+# if defined(BOOST_TASK_USE_DLL)
+# define BOOST_DYN_LINK
+# endif
+
+// Set the name of our library, this will get undef'ed by auto_link.hpp
+# if defined(BOOST_TASK_LIB_NAME)
+# define BOOST_LIB_NAME BOOST_TASK_LIB_NAME
+# else
+# define BOOST_LIB_NAME boost_task
 # endif
 
+// If we're importing code from a dll, then tell auto_link.hpp about it
+// And include the header that does the work
+#include <boost/config/auto_link.hpp>
+# endif // auto-linking disabled
+
 #endif // BOOST_TASK_DETAIL_CONFIG_H
 

Added: sandbox/task/boost/task/detail/platform.hpp
==============================================================================
--- (empty file)
+++ sandbox/task/boost/task/detail/platform.hpp 2009-04-17 15:27:36 EDT (Fri, 17 Apr 2009)
@@ -0,0 +1,39 @@
+
+// Copyright Oliver Kowalke 2009.
+// 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 file is based on platform.hpp of boost.thread
+
+#ifndef BOOST_TASK_DETAIL_PLATFORM_H
+#define BOOST_TASK_DETAIL_PLATFORM_H
+
+// fetch compiler and platform configuration
+#include <boost/config.hpp>
+
+// insist on threading support being available:
+#include <boost/config/requires_threads.hpp>
+
+// choose platform
+# if defined(linux) || defined(__linux) || defined(__linux__)
+# define BOOST_TASK_LINUX
+# elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+# define BOOST_TASK_BSD
+# elif defined(sun) || defined(__sun)
+# define BOOST_TASK_SOLARIS
+# elif defined(__hpux)
+# define BOOST_TASK_HPUX
+# elif defined(__CYGWIN__)
+# define BOOST_TASK_CYGWIN
+# elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+# define BOOST_TASK_WIN32
+# elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
+# define BOOST_TASK_MACOS
+# elif defined(__IBMCPP__) || defined(_AIX)
+# define BOOST_TASK_AIX
+# elif defined(__QNXNTO__)
+# define BOOST_TASK_QNXNTO
+# endif
+
+#endif // BOOST_TASK_DETAIL_PLATFORM_H

Modified: sandbox/task/libs/task/build/Jamfile.v2
==============================================================================
--- sandbox/task/libs/task/build/Jamfile.v2 (original)
+++ sandbox/task/libs/task/build/Jamfile.v2 2009-04-17 15:27:36 EDT (Fri, 17 Apr 2009)
@@ -1,10 +1,11 @@
+# Boost System Library Build Jamfile
+
+# (C) Copyright Oliver Kowalke 2009
 
-# Copyright Oliver Kowalke 2009.
 # 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)
+# (See accompanying file LICENSE_1_0.txt or www.boost.org/LICENSE_1_0.txt)
 
-# Boost System Library Build Jamfile
+# See library home page at http://www.boost.org/libs/system
 
 import os ;
 import feature ;
@@ -13,8 +14,8 @@
 
 project boost/tp
     : source-location ../src
- <link>shared:<define>BOOST_TASK_DYN_LINK=1
- <link>static:<define>BOOST_TASK_STATIC_LINK=1
+ <link>static:<define>BOOST_TASK_BUILD_LIB=1
+ <link>shared:<define>BOOST_TASK_BUILD_DLL=1
     ;
 
 local rule default_taskapi ( )
@@ -65,8 +66,8 @@
 
 lib boost_task
    : task_sources
- : <link>shared:<define>BOOST_TASK_DYN_LINK=1
- <link>static:<define>BOOST_TASK_STATIC_LINK=1
+ : <link>shared:<define>BOOST_TASK_USE_DLL=1
+ <link>static:<define>BOOST_TASK_USE_LIB=1
    ;
 
 boost-install boost_task ;


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