aboutsummaryrefslogtreecommitdiff
path: root/arrayfire-newer-boost-compute.patch
blob: b08c121ecfe10331b97258e085d6f316bc62a643 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
https://sources.debian.org/data/main/a/arrayfire/3.3.2+dfsg1-4/debian/patches/Use-compute-library-from-Boost-1.61.patch

From: Ghislain Antony Vaillant <ghisvail@gmail.com>
Date: Fri, 12 Aug 2016 08:35:19 +0100
Subject: Use compute library from Boost 1.61.

---
 src/backend/opencl/CMakeLists.txt | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/backend/opencl/CMakeLists.txt b/src/backend/opencl/CMakeLists.txt
index ded53bf..d7e3628 100644
--- a/src/backend/opencl/CMakeLists.txt
+++ b/src/backend/opencl/CMakeLists.txt
@@ -84,11 +84,13 @@ ADD_DEFINITIONS( -DBOOST_ALL_NO_LIB )
 SET(Boost_USE_STATIC_LIBS OFF)
 FIND_PACKAGE(Boost 1.48 REQUIRED)
 
-OPTION(USE_SYSTEM_BOOST_COMPUTE "Use system BoostCompute" OFF)
-IF(USE_SYSTEM_BOOST_COMPUTE)
-    FIND_PACKAGE(BoostCompute REQUIRED)
-ELSE()
-    INCLUDE("${CMAKE_MODULE_PATH}/build_boost_compute.cmake")
+IF(Boost_VERSION VERSION_LESS "1.61")
+    OPTION(USE_SYSTEM_BOOST_COMPUTE "Use system BoostCompute" OFF)
+    IF(USE_SYSTEM_BOOST_COMPUTE)
+        FIND_PACKAGE(BoostCompute REQUIRED)
+    ELSE()
+        INCLUDE("${CMAKE_MODULE_PATH}/build_boost_compute.cmake")
+    ENDIF()
 ENDIF()
 
 SET( cl_kernel_headers