diff options
author | Brad King <brad.king@kitware.com> | 2018-07-17 11:11:32 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-07-17 11:11:38 (GMT) |
commit | 689ce111a8bc20b3dfc60326b65fc03e918c9679 (patch) | |
tree | a78ebc3e0c897bee715f5f8a5c05ff151551ece8 /Modules | |
parent | 328410f26b86a7446035fa922a1ffb066b53bcf8 (diff) | |
parent | dee7bafb13c654a2d62196451f013ef40dd2120f (diff) | |
download | CMake-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.cmake | 31 |
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}) |