]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
Boost 1.61 required for clang/libc++
authorMatthew Barr <matthew.barr@intel.com>
Thu, 12 Jan 2017 23:23:00 +0000 (10:23 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Tue, 17 Jan 2017 00:38:31 +0000 (11:38 +1100)
The libc++ headers aren't specific enough and causes the compiler to think
there are ambiguous functions when using older Boost versions.

CMakeLists.txt

index dee408e3c3d8184f0522fd27d603dbae1a39f5dc..bc60fe4866b7ae9aab9df0fbf7dc4fb02d6d4b1f 100644 (file)
@@ -62,7 +62,14 @@ include_directories(SYSTEM include)
 set(BOOST_USE_STATIC_LIBS OFF)
 set(BOOST_USE_MULTITHREADED OFF)
 set(BOOST_USE_STATIC_RUNTIME OFF)
-set(BOOST_MINVERSION 1.57.0)
+if (CMAKE_SYSTEM_NAME MATCHES "Darwin"
+    OR (CMAKE_SYSTEM_NAME MATCHES "FreeBSD"
+        AND CMAKE_C_COMPILER_ID MATCHES "Clang"))
+    # we need a more recent boost for libc++ used by clang on OSX and FreeBSD
+    set(BOOST_MINVERSION 1.61.0)
+else ()
+    set(BOOST_MINVERSION 1.57.0)
+endif ()
 set(BOOST_NO_BOOST_CMAKE ON)
 
 # first check for Boost installed on the system