From affe68b4f7e55b5174c3dd1e1351e5b8529e3130 Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Wed, 19 Dec 2007 16:12:20 +0000 Subject: [PATCH] Add detection of Boost.Thread. --- .gitattributes | 4 ++ Installation/config/support/S08a-BOOST_THREAD | 16 ++++++++ .../config/support/S08b-MS_BOOST_THREAD | 16 ++++++++ .../config/support/S08c-BOOST_THREAD_GCC | 16 ++++++++ .../config/support/test_BOOST_THREAD.cpp | 41 +++++++++++++++++++ 5 files changed, 93 insertions(+) create mode 100644 Installation/config/support/S08a-BOOST_THREAD create mode 100644 Installation/config/support/S08b-MS_BOOST_THREAD create mode 100644 Installation/config/support/S08c-BOOST_THREAD_GCC create mode 100644 Installation/config/support/test_BOOST_THREAD.cpp diff --git a/.gitattributes b/.gitattributes index a3afa6c47f2..ea75189051c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1806,6 +1806,9 @@ Installation/config/support/S06a-BOOST_PROGRAM_OPTIONS -text Installation/config/support/S06b-MS_BOOST_PROGRAM_OPTIONS -text Installation/config/support/S06c-BOOST_PROGRAM_OPTIONS_GCC -text Installation/config/support/S07-BOOST_BIMAP -text +Installation/config/support/S08a-BOOST_THREAD -text +Installation/config/support/S08b-MS_BOOST_THREAD -text +Installation/config/support/S08c-BOOST_THREAD_GCC -text Installation/config/support/S15-X11 -text Installation/config/support/S20-GMP -text Installation/config/support/S21-GMPXX -text @@ -1855,6 +1858,7 @@ Installation/config/support/S93a-TAUCSFREEBSDLAPACK -text Installation/config/support/S93b-TAUCSFREEBSDATLAS -text Installation/config/support/S96-TAUCSDARWIN -text Installation/config/support/parse_files.awk -text +Installation/config/support/test_BOOST_THREAD.cpp -text Installation/src/CGAL/all_files.cpp -text Interpolation/doc_tex/Interpolation/nn_coords.eps -text svneol=unset#application/postscript Interpolation/doc_tex/Interpolation/nn_coords.gif -text svneol=unset#image/gif diff --git a/Installation/config/support/S08a-BOOST_THREAD b/Installation/config/support/S08a-BOOST_THREAD new file mode 100644 index 00000000000..f7d5e8939c3 --- /dev/null +++ b/Installation/config/support/S08a-BOOST_THREAD @@ -0,0 +1,16 @@ +# The Boost library (http://www.boost.org/) extends the C++ std library + +DESCRIPTION = +PROVIDES = BOOST_THREAD +CXXFLAGS = +LDFLAGS = +LIBS = boost_thread +REQUIRES = BOOST +INCOMPATIBLE = DOLLAR_WINDOWS_COMPILER +STDINCLDIRS = +INCLTHING = +STDLIBDIRS = /usr/lib:/sw/lib +LIBTHING = libboost_thread.\* +COMPILETESTFLAGS = + +# EOF diff --git a/Installation/config/support/S08b-MS_BOOST_THREAD b/Installation/config/support/S08b-MS_BOOST_THREAD new file mode 100644 index 00000000000..2fa3049f0b8 --- /dev/null +++ b/Installation/config/support/S08b-MS_BOOST_THREAD @@ -0,0 +1,16 @@ +# The Boost library (http://www.boost.org/) extends the C++ std library + +DESCRIPTION = +PROVIDES = BOOST_THREAD +CXXFLAGS = +LDFLAGS = +LIBS = +REQUIRES = DOLLAR_WINDOWS_COMPILER BOOST +INCOMPATIBLE = +STDINCLDIRS = +INCLTHING = +STDLIBDIRS = +LIBTHING = +COMPILETESTFLAGS = + +# EOF diff --git a/Installation/config/support/S08c-BOOST_THREAD_GCC b/Installation/config/support/S08c-BOOST_THREAD_GCC new file mode 100644 index 00000000000..03e32756d4b --- /dev/null +++ b/Installation/config/support/S08c-BOOST_THREAD_GCC @@ -0,0 +1,16 @@ +# The Boost library (http://www.boost.org/) extends the C++ std library + +DESCRIPTION = gcc/cygwin +PROVIDES = BOOST_THREAD +CXXFLAGS = +LDFLAGS = +LIBS = boost_thread-gcc-mt +REQUIRES = BOOST +INCOMPATIBLE = DOLLAR_WINDOWS_COMPILER +STDINCLDIRS = +INCLTHING = +STDLIBDIRS = +LIBTHING = +COMPILETESTFLAGS = + +# EOF diff --git a/Installation/config/support/test_BOOST_THREAD.cpp b/Installation/config/support/test_BOOST_THREAD.cpp new file mode 100644 index 00000000000..f55d71e045a --- /dev/null +++ b/Installation/config/support/test_BOOST_THREAD.cpp @@ -0,0 +1,41 @@ +// Copyright (c) 2007 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; version 2.1 of the License. +// See the file LICENSE.LGPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/trunk/Installation/config/support/test_BOOST_PROGRAM_OPTIONS.cpp $ +// $Id: test_BOOST_PROGRAM_OPTIONS.cpp 37323 2007-03-20 19:14:02Z reichel $ +// +// +// Author(s) : Sylvain Pion + +// Tests if BOOST.THREAD is available. + +#include +#include +#include +#include + +int main() +{ + std::cout << "version=" << BOOST_VERSION/100000 << "." + << ((BOOST_VERSION / 100) % 100) << "." + << BOOST_VERSION % 100 << std::endl; + + boost::thread_specific_ptr z; + if (z.get() == NULL) { + z.reset(new int(1)); + } + assert(*z.get() == 1); + + return 0; +}