OPENCLAMDBLAS and OPENCLAMDFFT cmake file cmake/OpenCVDetectOpenCL.cmake (Bug #2985)
Description
OPENCLAMDBLAS and OPENCLAMDFFT never detected under linux.
in file cmake/OpenCVDetectOpenCL.cmake line 45-49:
if (X86_64) set(CLAMD_POSSIBLE_LIB_SUFFIXES lib64/import) elseif (X86) set(CLAMD_POSSIBLE_LIB_SUFFIXES lib32/import) endif()
lib64/import and ib32/import is the path on Windows but not Linux.
And CLAMD_POSSIBLE_LIB_SUFFIXES is used to line 68 in
find_library(CLAMDFFT_LIBRARY NAMES clAmdFft.Runtime HINTS ${CLAMDFFT_ROOT_DIR} PATH_SUFFIXES ${CLAMD_POSSIBLE_LIB_SUFFIXES} DOC "clAmdFft library")
Associated revisions
fix for bug #2985:
OPENCLAMDBLAS and OPENCLAMDFFT never detected under linux.
lib64/import and lib32/import is the path on Windows but not Linux.
for CLAMDBLAS library we should use CLAMDBLAS_PATH (not CLAMDFFT_PATH)
Merge pull request #2985 from StevenPuttemans:fix_3777_redo
History
Updated by Franck Charpentier almost 12 years ago
with windows, the lib does not call clAmdFft.Runtime. a search on clAmdFft would be better for Windows and Linux.
Updated by Franck Charpentier almost 12 years ago
The last comment is an error. "NAMES" of find_library is really clAmdFft.Runtime
Updated by Franck Charpentier almost 12 years ago
to detect, I define the :
CLAMDBLAS_PATH=/opt/clAmdBlas-1.10.321 CLAMDFFT_PATH=/opt/clAmdFft-1.10.321
And this is their default location.
Updated by Franck Charpentier almost 12 years ago
The modified file as an attachment. This is probably not the best solution but on my linux, it goes.
diff OpenCVDetectOpenCL.cmake OpenCVDetectOpenCL.cmake.2 45c45 < if (WIN64) --- > if (X86_64) 47c47 < elseif (WIN32) --- > elseif (X86) 49,55c49 < endif() < < if (X86_64 AND UNIX ) < set(CLAMD_POSSIBLE_LIB_SUFFIXES lib64) < elseif (X86 AND UNIX) < set(CLAMD_POSSIBLE_LIB_SUFFIXES lib32) < endif() --- > endif() 72c66 < NAMES clAmdFft.Runtime --- > NAMES clAmdFft 87c81 < PATHS ENV CLAMDBLAS_PATH ENV ProgramFiles --- > PATHS ENV CLAMDFFT_PATH ENV ProgramFiles
- File OpenCVDetectOpenCL.cmake added
Updated by Anna Kogan almost 12 years ago
Hello Franck,
Could you please make a pull request containing the solution?
- Assignee changed from Andrey Kamaev to Franck Charpentier
Updated by Vladislav Vinogradov over 11 years ago
- Assignee changed from Franck Charpentier to Vladislav Vinogradov
- Pull request set to https://github.com/Itseez/opencv/pull/995
Updated by Vladislav Vinogradov over 11 years ago
- Status changed from Open to Done