summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-07-17 11:11:32 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-07-17 11:11:38 (GMT)
commit689ce111a8bc20b3dfc60326b65fc03e918c9679 (patch)
treea78ebc3e0c897bee715f5f8a5c05ff151551ece8 /Modules
parent328410f26b86a7446035fa922a1ffb066b53bcf8 (diff)
parentdee7bafb13c654a2d62196451f013ef40dd2120f (diff)
downloadCMake-689ce111a8bc20b3dfc60326b65fc03e918c9679.zip
CMake-689ce111a8bc20b3dfc60326b65fc03e918c9679.tar.gz
CMake-689ce111a8bc20b3dfc60326b65fc03e918c9679.tar.bz2
Merge topic 'FindOpenCL-arch-paths'
dee7bafb13 FindOpenCL: Search per-architecture path suffixes on UNIX Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2215
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindOpenCL.cmake31
1 files changed, 21 insertions, 10 deletions
diff --git a/Modules/FindOpenCL.cmake b/Modules/FindOpenCL.cmake
index 297a5fb..fe162b4 100644
--- a/Modules/FindOpenCL.cmake
+++ b/Modules/FindOpenCL.cmake
@@ -119,16 +119,27 @@ if(WIN32)
OpenCL/common/lib/x64)
endif()
else()
- find_library(OpenCL_LIBRARY
- NAMES OpenCL
- PATHS
- ENV AMDAPPSDKROOT
- ENV CUDA_PATH
- PATH_SUFFIXES
- lib/x86_64
- lib/x64
- lib
- lib64)
+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ find_library(OpenCL_LIBRARY
+ NAMES OpenCL
+ PATHS
+ ENV AMDAPPSDKROOT
+ ENV CUDA_PATH
+ PATH_SUFFIXES
+ lib/x86
+ lib)
+ elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ find_library(OpenCL_LIBRARY
+ NAMES OpenCL
+ PATHS
+ ENV AMDAPPSDKROOT
+ ENV CUDA_PATH
+ PATH_SUFFIXES
+ lib/x86_64
+ lib/x64
+ lib
+ lib64)
+ endif()
endif()
set(OpenCL_LIBRARIES ${OpenCL_LIBRARY})