Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69977 - trunk/libs/random/performance
From: steven_at_[hidden]
Date: 2011-03-14 16:20:09


Author: steven_watanabe
Date: 2011-03-14 16:20:08 EDT (Mon, 14 Mar 2011)
New Revision: 69977
URL: http://svn.boost.org/trac/boost/changeset/69977

Log:
Automate detection of mt19937ar.c
Text files modified:
   trunk/libs/random/performance/Jamfile.v2 | 13 ++++++++++++-
   trunk/libs/random/performance/random_speed.cpp | 2 +-
   2 files changed, 13 insertions(+), 2 deletions(-)

Modified: trunk/libs/random/performance/Jamfile.v2
==============================================================================
--- trunk/libs/random/performance/Jamfile.v2 (original)
+++ trunk/libs/random/performance/Jamfile.v2 2011-03-14 16:20:08 EDT (Mon, 14 Mar 2011)
@@ -1,4 +1,15 @@
-exe random_speed.exe : random_speed.cpp mt19937ar.c : release ;
+mt19937ar-files = [ glob mt19937ar.c ] ;
+
+if $(mt19937ar-files)
+{
+ alias mt19937ar : $(mt19937ar-files) : : <define>HAVE_MT19937AR_C ;
+}
+else
+{
+ alias mt19937ar ;
+}
+
+exe random_speed.exe : random_speed.cpp mt19937ar : release ;
 exe generate_table.exe : generate_table.cpp /boost//regex : <link>static ;
 exe nondet_random_speed.exe : nondet_random_speed.cpp /boost//random : release <link>static ;
 

Modified: trunk/libs/random/performance/random_speed.cpp
==============================================================================
--- trunk/libs/random/performance/random_speed.cpp (original)
+++ trunk/libs/random/performance/random_speed.cpp 2011-03-14 16:20:08 EDT (Mon, 14 Mar 2011)
@@ -27,7 +27,7 @@
 #undef HAVE_MT19937INT_C
 
 // define if you have the original mt19937ar.c (with commented out main())
-#define HAVE_MT19937AR_C
+// #define HAVE_MT19937AR_C
 
 // set to your CPU frequency
 static const double cpu_frequency = 1.87 * 1e9;


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