|
|
|
@ -40,17 +40,17 @@ if(NOT "${CUDA_NPP_LIBRARY_ROOT_DIR}" STREQUAL "${CUDA_NPP_LIBRARY_ROOT_DIR_INTE |
|
|
|
|
unset(CUDA_NPP_INCLUDES CACHE) |
|
|
|
|
unset(CUDA_NPP_LIBRARIES CACHE) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(${CMAKE_SIZEOF_VOID_P} EQUAL 4) |
|
|
|
|
if (UNIX OR APPLE) |
|
|
|
|
if (UNIX OR APPLE) |
|
|
|
|
set(NPP_SUFFIX "32") |
|
|
|
|
else() |
|
|
|
|
else() |
|
|
|
|
set(NPP_SUFFIX "-mt") |
|
|
|
|
endif() |
|
|
|
|
elseif(${CMAKE_SIZEOF_VOID_P} EQUAL 4) |
|
|
|
|
if (UNIX OR APPLE) |
|
|
|
|
else(${CMAKE_SIZEOF_VOID_P} EQUAL 4) |
|
|
|
|
if (UNIX OR APPLE) |
|
|
|
|
set(NPP_SUFFIX "64") |
|
|
|
|
else() |
|
|
|
|
else() |
|
|
|
|
set(NPP_SUFFIX "-mt-x64") |
|
|
|
|
endif() |
|
|
|
|
endif(${CMAKE_SIZEOF_VOID_P} EQUAL 4) |
|
|
|
@ -63,20 +63,21 @@ endif (NOT CUDA_NPP_LIBRARY_ROOT_DIR) |
|
|
|
|
find_path(CUDA_NPP_INCLUDES npp.h PATHS "${CUDA_NPP_LIBRARY_ROOT_DIR}/common/npp/include" NO_DEFAULT_PATH) |
|
|
|
|
# Search default search paths, after we search our own set of paths. |
|
|
|
|
find_path(CUDA_NPP_INCLUDES device_functions.h) |
|
|
|
|
mark_as_advanced(CUDA_NPP_INCLUDES) |
|
|
|
|
mark_as_advanced(CUDA_NPP_INCLUDES) |
|
|
|
|
|
|
|
|
|
# Find NPP library |
|
|
|
|
find_library(CUDA_NPP_LIBRARIES |
|
|
|
|
NAMES libnpp${NPP_SUFFIX} |
|
|
|
|
NAMES npp${NPP_SUFFIX} libnpp${NPP_SUFFIX} |
|
|
|
|
PATHS "${CUDA_NPP_LIBRARY_ROOT_DIR}/common/lib" |
|
|
|
|
DOC "NPP library" |
|
|
|
|
NO_DEFAULT_PATH |
|
|
|
|
) |
|
|
|
|
# Search default search paths, after we search our own set of paths. |
|
|
|
|
find_library(CUDA_NPP_LIBRARIES NAMES libnpp${NPP_SUFFIX} DOC "NPP library") |
|
|
|
|
mark_as_advanced(CUDA_NPP_LIBRARIES) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
if(NOT EXISTS ${CUDA_NPP_LIBRARIES} OR NOT EXISTS ${CUDA_NPP_INCLUDES}/npp.h) |
|
|
|
|
# Search default search paths, after we search our own set of paths. |
|
|
|
|
find_library(CUDA_NPP_LIBRARIES NAMES npp${NPP_SUFFIX} libnpp${NPP_SUFFIX} DOC "NPP library") |
|
|
|
|
mark_as_advanced(CUDA_NPP_LIBRARIES) |
|
|
|
|
|
|
|
|
|
if(NOT EXISTS ${CUDA_NPP_LIBRARIES} OR NOT EXISTS ${CUDA_NPP_INCLUDES}/npp.h) |
|
|
|
|
if(NPP_FIND_REQUIRED) |
|
|
|
|
message(FATAL_ERROR "NPP headers/libraries are not found. Specify CUDA_NPP_LIBRARY_ROOT_DIR.") |
|
|
|
|
elseif(NOT CUDA_FIND_QUIETLY) |
|
|
|
|