Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit 4d09e382 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

add hints to look for cuda libraries

parent 8c815572
......@@ -312,11 +312,18 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN
mark_as_advanced(CUDA_SDK_ROOT_DIR)
mark_as_advanced(CUDA_TOOLKIT_ROOT_DIR)
mark_as_advanced(CUDA_VERBOSE_BUILD)
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
string(REGEX REPLACE "-l" "" CUDA_LIBS "${CUDA_LIBRARIES}")
set(CUDA_LIBRARIES)
foreach(_lib ${CUDA_LIBS})
find_library(CUDA_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
HINTS $ENV{CUDA_ROOT}/lib64 ${_lib_env} ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (CUDA_${_lib}_LIBRARY)
list(APPEND CUDA_LIBRARIES ${CUDA_${_lib}_LIBRARY})
endif()
......
......@@ -78,11 +78,18 @@ else()
find_package(CUDA)
endif()
if( CUDA_FOUND )
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
string(REGEX REPLACE "-l" "" CUDA_LIBS "${CUDA_LIBRARIES}")
set(CUDA_LIBRARIES)
foreach(_lib ${CUDA_LIBS})
find_library(CUDA_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
HINTS $ENV{CUDA_ROOT}/lib64 ${_lib_env} ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (CUDA_${_lib}_LIBRARY)
list(APPEND CUDA_LIBRARIES ${CUDA_${_lib}_LIBRARY})
endif()
......
......@@ -215,11 +215,18 @@ if (PARSEC_LOOK_FOR_CUDA)
mark_as_advanced(CUDA_SDK_ROOT_DIR)
mark_as_advanced(CUDA_TOOLKIT_ROOT_DIR)
mark_as_advanced(CUDA_VERBOSE_BUILD)
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
string(REGEX REPLACE "-l" "" CUDA_LIBS "${CUDA_LIBRARIES}")
set(CUDA_LIBRARIES)
foreach(_lib ${CUDA_LIBS})
find_library(CUDA_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
HINTS $ENV{CUDA_ROOT}/lib64 ${_lib_env} ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (CUDA_${_lib}_LIBRARY)
list(APPEND CUDA_LIBRARIES ${CUDA_${_lib}_LIBRARY})
endif()
......
......@@ -170,11 +170,18 @@ if (STARPU_LOOK_FOR_CUDA)
mark_as_advanced(CUDA_SDK_ROOT_DIR)
mark_as_advanced(CUDA_TOOLKIT_ROOT_DIR)
mark_as_advanced(CUDA_VERBOSE_BUILD)
if(WIN32)
string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
elseif(APPLE)
string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
else()
string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
endif()
string(REGEX REPLACE "-l" "" CUDA_LIBS "${CUDA_LIBRARIES}")
set(CUDA_LIBRARIES)
foreach(_lib ${CUDA_LIBS})
find_library(CUDA_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
HINTS $ENV{CUDA_ROOT}/lib64 ${_lib_env} ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (CUDA_${_lib}_LIBRARY)
list(APPEND CUDA_LIBRARIES ${CUDA_${_lib}_LIBRARY})
endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment