Commit 8c815572 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

replace libs in CUDA_LIBRARIES with absolute paths

parent 20f466e5
......@@ -312,6 +312,15 @@ 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)
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})
if (CUDA_${_lib}_LIBRARY)
list(APPEND CUDA_LIBRARIES ${CUDA_${_lib}_LIBRARY})
endif()
endforeach()
endif()
endif()
......
......@@ -77,6 +77,17 @@ if(MAGMA_FIND_REQUIRED)
else()
find_package(CUDA)
endif()
if( CUDA_FOUND )
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})
if (CUDA_${_lib}_LIBRARY)
list(APPEND CUDA_LIBRARIES ${CUDA_${_lib}_LIBRARY})
endif()
endforeach()
endif ()
# MAGMA depends on cuBLAS which should come with CUDA, if not found -> error
if (NOT CUDA_CUBLAS_LIBRARIES)
if(MAGMA_FIND_REQUIRED)
......
......@@ -215,6 +215,15 @@ 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)
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})
if (CUDA_${_lib}_LIBRARY)
list(APPEND CUDA_LIBRARIES ${CUDA_${_lib}_LIBRARY})
endif()
endforeach()
endif()
endif()
......
......@@ -170,6 +170,15 @@ 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)
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})
if (CUDA_${_lib}_LIBRARY)
list(APPEND CUDA_LIBRARIES ${CUDA_${_lib}_LIBRARY})
endif()
endforeach()
endif()
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