[arrayfire] 54/79: Fixed examples cmake for unix
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Jun 15 13:38:07 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch master
in repository arrayfire.
commit bbab9e8d0b77a665371ba64e123986da552a364f
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date: Wed Jun 10 14:17:07 2015 -0400
Fixed examples cmake for unix
---
examples/CMakeLists.txt | 10 ++++++++--
src/backend/opencl/CMakeLists.txt | 15 ---------------
2 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 5b9f128..e448046 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -71,7 +71,13 @@ FOREACH(FILE ${FILES})
if (${CUDA_FOUND})
if(${ArrayFire_CUDA_FOUND}) # variable defined by FIND(ArrayFire ...)
- BUILD_EXAMPLE(${EXAMPLE} ${FILE} cuda ${ArrayFire_CUDA_LIBRARIES} "")
+ FIND_LIBRARY( CUDA_NVVM_LIBRARY
+ NAMES "nvvm"
+ PATH_SUFFIXES "nvvm/lib64" "nvvm/lib"
+ PATHS ${CUDA_TOOLKIT_ROOT_DIR}
+ DOC "CUDA NVVM Library"
+ )
+ BUILD_EXAMPLE(${EXAMPLE} ${FILE} cuda ${ArrayFire_CUDA_LIBRARIES} "${CUDA_CUBLAS_LIBRARIES};${CUDA_LIBRARIES};${CUDA_cusolver_LIBRARY};${CUDA_CUFFT_LIBRARIES};${CUDA_NVVM_LIBRARY};${CUDA_CUDA_LIBRARY}")
elseif(TARGET afcuda) # variable defined by the ArrayFire build tree
BUILD_EXAMPLE(${EXAMPLE} ${FILE} cuda afcuda "")
endif()
@@ -79,7 +85,7 @@ FOREACH(FILE ${FILES})
if (${OpenCL_FOUND})
if(${ArrayFire_OpenCL_FOUND}) # variable defined by FIND(ArrayFire ...)
- BUILD_EXAMPLE(${EXAMPLE} ${FILE} opencl ${ArrayFire_OpenCL_LIBRARIES} "")
+ BUILD_EXAMPLE(${EXAMPLE} ${FILE} opencl ${ArrayFire_OpenCL_LIBRARIES} "${OpenCL_LIBRARIES}")
elseif(TARGET afopencl) # variable defined by the ArrayFire build tree
BUILD_EXAMPLE(${EXAMPLE} ${FILE} opencl afopencl ${OpenCL_LIBRARIES})
endif()
diff --git a/src/backend/opencl/CMakeLists.txt b/src/backend/opencl/CMakeLists.txt
index 7e3c485..662805f 100644
--- a/src/backend/opencl/CMakeLists.txt
+++ b/src/backend/opencl/CMakeLists.txt
@@ -210,21 +210,6 @@ IF(FORGE_FOUND)
TARGET_LINK_LIBRARIES(afopencl PRIVATE ${FORGE_LIBRARIES})
ENDIF()
-# locally built but not installed libraries (clBLAS and clFFT) must NOT appear in the
-# link interface. The best option would be to use LINK_PRIVATE, but unfortunately
-# it is not available for older cmake than 2.8.7, so they must be remove from
-# the link interface manually. Both LINK_INTERFACE_LIBRARIES and INTERFACE_LINK_LIBRARIES
-# are used to keep it working with older cmake versions that 2.8.12 and avoid
-# warnings on newer versions - see CMP0022
-FOREACH(property LINK_INTERFACE_LIBRARIES INTERFACE_LINK_LIBRARIES)
- GET_TARGET_PROPERTY(value afopencl ${property})
- IF(value)
- LIST(REMOVE_ITEM value ${CLBLAS_LIBRARIES} ${CLFFT_LIBRARIES})
- SET_TARGET_PROPERTIES(afopencl PROPERTIES LINK_INTERFACE_LIBRARIES "${value}")
- SET_TARGET_PROPERTIES(afopencl PROPERTIES INTERFACE_LINK_LIBRARIES "${value}")
- ENDIF()
-ENDFOREACH()
-
INSTALL(TARGETS afopencl EXPORT OpenCL DESTINATION "${AF_INSTALL_LIB_DIR}"
COMPONENT libraries)
--
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