@ -95,26 +95,29 @@ if(EXISTS ${CUDA_NPP_INCLUDES}/nppversion.h)
string ( REGEX MATCH "[0-9]+" npp_major ${ npp_major } )
string ( REGEX MATCH "[0-9]+" npp_minor ${ npp_minor } )
string ( REGEX MATCH "[0-9]+" npp_build ${ npp_build } )
set ( NPP_VERSION "${npp_major}.${npp_minor}.${npp_build}" )
MESSAGE ( STATUS "Npp version: " ${ NPP_VERSION } )
set ( NPP_VERSION "${npp_major}.${npp_minor}.${npp_build}" )
endif ( )
if ( NOT EXISTS ${ CUDA_NPP_LIBRARIES } OR NOT EXISTS ${ CUDA_NPP_INCLUDES } /npp.h )
set ( CUDA_NPP_FOUND FALSE )
unset ( CUDA_NPP_INCLUDES CACHE )
unset ( CUDA_NPP_LIBRARIES CACHE )
set ( CUDA_NPP_FOUND FALSE )
message ( FATAL_ERROR "NPP headers/libraries are not found. Please specify CUDA_NPP_LIBRARY_ROOT_DIR in CMake or set $NPP_ROOT_DIR." )
endif ( )
include ( FindPackageHandleStandardArgs )
find_package_handle_standard_args ( NPP
R E Q U I R E D _ V A R S
C U D A _ N P P _ I N C L U D E S
C U D A _ N P P _ L I B R A R I E S
V E R S I O N _ V A R
N P P _ V E R S I O N )
if ( APPLE )
# W e n e e d t o a d d t h e p a t h t o c u d a r t t o t h e l i n k e r u s i n g r p a t h , s i n c e t h e
# l i b r a r y n a m e f o r t h e c u d a l i b r a r i e s i s p r e p e n d e d w i t h @ r p a t h .
# W e n e e d t o a d d t h e p a t h t o c u d a r t t o t h e l i n k e r u s i n g r p a t h , s i n c e t h e l i b r a r y n a m e f o r t h e c u d a l i b r a r i e s i s p r e p e n d e d w i t h @ r p a t h .
get_filename_component ( _cuda_path_to_npp "${CUDA_NPP_LIBRARIES}" PATH )
if ( _cuda_path_to_npp )
list ( APPEND CUDA_NPP_LIBRARIES -Wl,-rpath "-Wl,${_cuda_path_to_npp}" )
endif ( )
endif ( )
endif ( )
set ( CUDA_NPP_FOUND TRUE )
set ( CUDA_NPP_LIBRARY_ROOT_DIR_INTERNAL "${CUDA_NPP_LIBRARY_ROOT_DIR}" CACHE INTERNAL "This is the value of the last time CUDA_NPP_LIBRARY_ROOT_DIR was set successfully." FORCE )