$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r85616 - trunk/libs/thread/build
From: vicente.botet_at_[hidden]
Date: 2013-09-08 18:20:48
Author: viboes
Date: 2013-09-08 18:20:48 EDT (Sun, 08 Sep 2013)
New Revision: 85616
URL: http://svn.boost.org/trac/boost/changeset/85616
Log:
Thread: link with boost_atomic conditionaly.
Added:
   trunk/libs/thread/build/has_atomic_flag_lockfree_test.cpp   (contents, props changed)
Text files modified: 
   trunk/libs/thread/build/Jamfile.v2                        |    12 +++++++-----                            
   trunk/libs/thread/build/has_atomic_flag_lockfree_test.cpp |    13 +++++++++++++                           
   2 files changed, 20 insertions(+), 5 deletions(-)
Modified: trunk/libs/thread/build/Jamfile.v2
==============================================================================
--- trunk/libs/thread/build/Jamfile.v2	Sun Sep  8 16:07:03 2013	(r85615)
+++ trunk/libs/thread/build/Jamfile.v2	2013-09-08 18:20:48 EDT (Sun, 08 Sep 2013)	(r85616)
@@ -36,6 +36,7 @@
 import feature ;
 import indirect ;
 import path ;
+import configure ; 
 
 project boost/thread
     : source-location ../src
@@ -140,6 +141,8 @@
 feature.feature threadapi : pthread win32 : propagated ;
 feature.set-default threadapi : [ default_threadapi ] ;
 
+exe has_atomic_flag_lockfree : ../build/has_atomic_flag_lockfree_test.cpp ; 
+
 rule tag ( name : type ? : property-set )
 {
     local result = $(name) ;
@@ -264,16 +267,15 @@
             }
         }
         result += <define>BOOST_THREAD_DONT_USE_CHRONO ;
+        if ! [ configure.builds has_atomic_flag_lockfree 
+            : $(properties) : "lockfree boost::atomic_flag" ]  { 
+           result += <library>/boost/atomic//boost_atomic ; 
+        } 
     } else {
         result += <define>BOOST_THREAD_USES_CHRONO ;
         result += <library>/boost/chrono//boost_chrono ;
     }
 
-    #if <toolset>pgi in $(properties)  || <toolset>vacpp in $(properties)
-    #{
-      result += <library>/boost/atomic//boost_atomic ;
-    #}
-
     return $(result) ;
 }
 
Added: trunk/libs/thread/build/has_atomic_flag_lockfree_test.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/libs/thread/build/has_atomic_flag_lockfree_test.cpp	2013-09-08 18:20:48 EDT (Sun, 08 Sep 2013)	(r85616)
@@ -0,0 +1,13 @@
+// Copyright (c) 2013, Petr Machata, Red Hat Inc. 
+// 
+// Use modification and distribution are subject to the boost Software 
+// License, Version 1.0.  (See http://www.boost.org/LICENSE_1_0.txt). 
+  
+#include "../../../boost/atomic.hpp" 
+#include "../../../boost/static_assert.hpp" 
+
+int main(int argc, char *argv[]) 
+{ 
+  BOOST_STATIC_ASSERT(BOOST_ATOMIC_FLAG_LOCK_FREE); 
+  return 0; 
+} 
\ No newline at end of file