[arrayfire] 147/408: Automatically enable and build CUDA and OpenCL backends by default.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:11:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/sid
in repository arrayfire.

commit 89d7e650582dbce98b44c8d876ef4ff227c2a48e
Author: Brian Kloppenborg <brian at kloppenborg.net>
Date:   Tue Jul 14 11:21:48 2015 -0400

    Automatically enable and build CUDA and OpenCL backends by default.
---
 CMakeLists.txt | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6ec8ea..244c764 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,12 +3,26 @@ PROJECT(ARRAYFIRE)
 
 SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
 
+SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
+INCLUDE(${CMAKE_MODULE_PATH}/UploadCoveralls.cmake)
+INCLUDE(AFInstallDirs)
+
 OPTION(BUILD_TEST "Build Tests" ON)
 OPTION(BUILD_EXAMPLES "Build Examples" ON)
 OPTION(BUILD_GTEST "Download gtest and check for updates. Necessary if you change compilers" ON)
 
 OPTION(BUILD_CPU "Build ArrayFire with a CPU backend" ON)
+
+FIND_PACKAGE(CUDA)
+IF(${CUDA_FOUND})
+    SET(BUILD_CUDA ON CACHE BOOL "")
+ENDIF(${CUDA_FOUND})
 OPTION(BUILD_CUDA "Build ArrayFire with a CUDA backend" OFF)
+
+FIND_PACKAGE(OpenCL)
+IF(${OpenCL_FOUND})
+    SET(BUILD_OPENCL ON CACHE BOOL "")
+ENDIF(${OpenCL_FOUND})
 OPTION(BUILD_OPENCL "Build ArrayFire with a OpenCL backend" OFF)
 
 OPTION(BUILD_GRAPHICS "Build ArrayFire with Forge Graphics" ON)
@@ -24,10 +38,6 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
       "MinSizeRel" "RelWithDebInfo")
 endif()
 
-SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
-INCLUDE(${CMAKE_MODULE_PATH}/UploadCoveralls.cmake)
-INCLUDE(AFInstallDirs)
-
 FIND_PACKAGE(FreeImage)
 IF(FREEIMAGE_FOUND)
     ADD_DEFINITIONS(-DWITH_FREEIMAGE)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git



More information about the debian-science-commits mailing list