diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index 05b2b4bb011..1409442f10b 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -424,6 +424,12 @@ using std::max; #define CGAL_CAN_USE_CXX11_THREAD_LOCAL #endif +#if ( defined(__GNUC__) && defined(__GNUC_MINOR__) \ + && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 \ + && __cplusplus >= 201103L ) || ( _MSC_VER >= 1700 ) +#define CGAL_CAN_USE_CXX11_MUTEX +#endif + // Support for LEDA with threads // Not that, if CGAL_HAS_THREADS is defined, and you want to use LEDA, // you must link with a version of LEDA libraries that support threads. diff --git a/Installation/include/CGAL/mutex.h b/Installation/include/CGAL/mutex.h index 009bf1fa288..0491970d485 100644 --- a/Installation/include/CGAL/mutex.h +++ b/Installation/include/CGAL/mutex.h @@ -4,7 +4,7 @@ #include #ifdef CGAL_HAS_THREADS -#ifdef BOOST_MSVC +#ifdef CGAL_CAN_USE_CXX11_MUTEX #include #define CGAL_MUTEX std::mutex #define CGAL_SCOPED_LOCK(M) std::unique_lock scoped_lock(M)