Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 20f466e5 authored by PRUVOST Florent's avatar PRUVOST Florent

replace libs in CMAKE_THREAD_LIBS_INIT with absolute paths

parent 26ea29d3
...@@ -609,6 +609,17 @@ if( (NOT BLAS_FOUND_WITH_PKGCONFIG) OR BLAS_GIVEN_BY_USER ) ...@@ -609,6 +609,17 @@ if( (NOT BLAS_FOUND_WITH_PKGCONFIG) OR BLAS_GIVEN_BY_USER )
else() else()
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
endif() endif()
if( THREADS_FOUND )
string(REGEX REPLACE "-l" "" THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
set(CMAKE_THREAD_LIBS_INIT)
foreach(_lib ${THREAD_LIBS})
find_library(THREADS_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (THREADS_${_lib}_LIBRARY)
list(APPEND CMAKE_THREAD_LIBS_INIT ${THREADS_${_lib}_LIBRARY})
endif()
endforeach()
endif ()
set(BLAS_SEARCH_LIBS "") set(BLAS_SEARCH_LIBS "")
......
...@@ -203,6 +203,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN ...@@ -203,6 +203,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN
endif() endif()
set(CHAMELEON_EXTRA_LIBRARIES "") set(CHAMELEON_EXTRA_LIBRARIES "")
if( THREADS_FOUND ) if( THREADS_FOUND )
string(REGEX REPLACE "-l" "" THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
set(CMAKE_THREAD_LIBS_INIT)
foreach(_lib ${THREAD_LIBS})
find_library(THREADS_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (THREADS_${_lib}_LIBRARY)
list(APPEND CMAKE_THREAD_LIBS_INIT ${THREADS_${_lib}_LIBRARY})
endif()
endforeach()
list(APPEND CHAMELEON_EXTRA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) list(APPEND CHAMELEON_EXTRA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
endif () endif ()
......
...@@ -222,6 +222,19 @@ if (FFTW_LOOK_FOR_ESSL) ...@@ -222,6 +222,19 @@ if (FFTW_LOOK_FOR_ESSL)
endif() endif()
endif() endif()
if( THREADS_FOUND )
string(REGEX REPLACE "-l" "" THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
set(CMAKE_THREAD_LIBS_INIT)
foreach(_lib ${THREAD_LIBS})
find_library(THREADS_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (THREADS_${_lib}_LIBRARY)
list(APPEND CMAKE_THREAD_LIBS_INIT ${THREADS_${_lib}_LIBRARY})
endif()
endforeach()
endif ()
set(ENV_FFTW_DIR "$ENV{FFTW_DIR}") set(ENV_FFTW_DIR "$ENV{FFTW_DIR}")
set(ENV_FFTW_INCDIR "$ENV{FFTW_INCDIR}") set(ENV_FFTW_INCDIR "$ENV{FFTW_INCDIR}")
set(ENV_FFTW_LIBDIR "$ENV{FFTW_LIBDIR}") set(ENV_FFTW_LIBDIR "$ENV{FFTW_LIBDIR}")
......
...@@ -466,6 +466,17 @@ if(BLAS_FOUND) ...@@ -466,6 +466,17 @@ if(BLAS_FOUND)
else() else()
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
endif() endif()
if( THREADS_FOUND )
string(REGEX REPLACE "-l" "" THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
set(CMAKE_THREAD_LIBS_INIT)
foreach(_lib ${THREAD_LIBS})
find_library(THREADS_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (THREADS_${_lib}_LIBRARY)
list(APPEND CMAKE_THREAD_LIBS_INIT ${THREADS_${_lib}_LIBRARY})
endif()
endforeach()
endif ()
set(LAPACK_SEARCH_LIBS "") set(LAPACK_SEARCH_LIBS "")
......
...@@ -141,6 +141,17 @@ if (MUMPS_FIND_REQUIRED) ...@@ -141,6 +141,17 @@ if (MUMPS_FIND_REQUIRED)
else() else()
find_package(Threads) find_package(Threads)
endif() endif()
if( THREADS_FOUND )
string(REGEX REPLACE "-l" "" THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
set(CMAKE_THREAD_LIBS_INIT)
foreach(_lib ${THREAD_LIBS})
find_library(THREADS_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (THREADS_${_lib}_LIBRARY)
list(APPEND CMAKE_THREAD_LIBS_INIT ${THREADS_${_lib}_LIBRARY})
endif()
endforeach()
endif ()
set(MUMPS_EXTRA_LIBRARIES "") set(MUMPS_EXTRA_LIBRARIES "")
if( THREADS_FOUND ) if( THREADS_FOUND )
list(APPEND MUMPS_EXTRA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) list(APPEND MUMPS_EXTRA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
......
...@@ -117,6 +117,17 @@ if (PARSEC_FIND_REQUIRED) ...@@ -117,6 +117,17 @@ if (PARSEC_FIND_REQUIRED)
else() else()
find_package(Threads) find_package(Threads)
endif() endif()
if( THREADS_FOUND )
string(REGEX REPLACE "-l" "" THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
set(CMAKE_THREAD_LIBS_INIT)
foreach(_lib ${THREAD_LIBS})
find_library(THREADS_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (THREADS_${_lib}_LIBRARY)
list(APPEND CMAKE_THREAD_LIBS_INIT ${THREADS_${_lib}_LIBRARY})
endif()
endforeach()
endif ()
set(PARSEC_EXTRA_LIBRARIES "") set(PARSEC_EXTRA_LIBRARIES "")
if( THREADS_FOUND ) if( THREADS_FOUND )
list(APPEND PARSEC_EXTRA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) list(APPEND PARSEC_EXTRA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
......
...@@ -165,6 +165,17 @@ if (PASTIX_FIND_REQUIRED) ...@@ -165,6 +165,17 @@ if (PASTIX_FIND_REQUIRED)
else() else()
find_package(Threads) find_package(Threads)
endif() endif()
if( THREADS_FOUND )
string(REGEX REPLACE "-l" "" THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
set(CMAKE_THREAD_LIBS_INIT)
foreach(_lib ${THREAD_LIBS})
find_library(THREADS_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (THREADS_${_lib}_LIBRARY)
list(APPEND CMAKE_THREAD_LIBS_INIT ${THREADS_${_lib}_LIBRARY})
endif()
endforeach()
endif ()
set(PASTIX_EXTRA_LIBRARIES "") set(PASTIX_EXTRA_LIBRARIES "")
if( THREADS_FOUND ) if( THREADS_FOUND )
list(APPEND PASTIX_EXTRA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) list(APPEND PASTIX_EXTRA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
......
...@@ -87,6 +87,17 @@ if (PTSCOTCH_FIND_REQUIRED) ...@@ -87,6 +87,17 @@ if (PTSCOTCH_FIND_REQUIRED)
else() else()
find_package(Threads) find_package(Threads)
endif() endif()
if( THREADS_FOUND )
string(REGEX REPLACE "-l" "" THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
set(CMAKE_THREAD_LIBS_INIT)
foreach(_lib ${THREAD_LIBS})
find_library(THREADS_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (THREADS_${_lib}_LIBRARY)
list(APPEND CMAKE_THREAD_LIBS_INIT ${THREADS_${_lib}_LIBRARY})
endif()
endforeach()
endif ()
# PTSCOTCH depends on MPI, try to find it # PTSCOTCH depends on MPI, try to find it
if (PTSCOTCH_FIND_REQUIRED) if (PTSCOTCH_FIND_REQUIRED)
......
...@@ -88,6 +88,17 @@ if (QUARK_FIND_REQUIRED) ...@@ -88,6 +88,17 @@ if (QUARK_FIND_REQUIRED)
else() else()
find_package(Threads) find_package(Threads)
endif() endif()
if( THREADS_FOUND )
string(REGEX REPLACE "-l" "" THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
set(CMAKE_THREAD_LIBS_INIT)
foreach(_lib ${THREAD_LIBS})
find_library(THREADS_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (THREADS_${_lib}_LIBRARY)
list(APPEND CMAKE_THREAD_LIBS_INIT ${THREADS_${_lib}_LIBRARY})
endif()
endforeach()
endif ()
# QUARK may depend on HWLOC, try to find it # QUARK may depend on HWLOC, try to find it
if (QUARK_LOOK_FOR_HWLOC) if (QUARK_LOOK_FOR_HWLOC)
......
...@@ -341,7 +341,17 @@ if(BLAS_FOUND AND LAPACK_FOUND AND MPI_FOUND) ...@@ -341,7 +341,17 @@ if(BLAS_FOUND AND LAPACK_FOUND AND MPI_FOUND)
else() else()
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
endif() endif()
if( THREADS_FOUND )
string(REGEX REPLACE "-l" "" THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
set(CMAKE_THREAD_LIBS_INIT)
foreach(_lib ${THREAD_LIBS})
find_library(THREADS_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (THREADS_${_lib}_LIBRARY)
list(APPEND CMAKE_THREAD_LIBS_INIT ${THREADS_${_lib}_LIBRARY})
endif()
endforeach()
endif ()
set(SCALAPACK_SEARCH_LIBS "") set(SCALAPACK_SEARCH_LIBS "")
if (BLA_F95) if (BLA_F95)
......
...@@ -76,6 +76,17 @@ if (SCOTCH_FIND_REQUIRED) ...@@ -76,6 +76,17 @@ if (SCOTCH_FIND_REQUIRED)
else() else()
find_package(Threads) find_package(Threads)
endif() endif()
if( THREADS_FOUND )
string(REGEX REPLACE "-l" "" THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
set(CMAKE_THREAD_LIBS_INIT)
foreach(_lib ${THREAD_LIBS})
find_library(THREADS_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (THREADS_${_lib}_LIBRARY)
list(APPEND CMAKE_THREAD_LIBS_INIT ${THREADS_${_lib}_LIBRARY})
endif()
endforeach()
endif ()
# Looking for include # Looking for include
# ------------------- # -------------------
......
...@@ -121,6 +121,17 @@ endif() ...@@ -121,6 +121,17 @@ endif()
# STARPU may depend on pthread, try to find it # STARPU may depend on pthread, try to find it
find_package(Threads) find_package(Threads)
if( THREADS_FOUND )
string(REGEX REPLACE "-l" "" THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
set(CMAKE_THREAD_LIBS_INIT)
foreach(_lib ${THREAD_LIBS})
find_library(THREADS_${_lib}_LIBRARY NAMES ${_lib}
HINTS ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if (THREADS_${_lib}_LIBRARY)
list(APPEND CMAKE_THREAD_LIBS_INIT ${THREADS_${_lib}_LIBRARY})
endif()
endforeach()
endif ()
if( THREADS_FOUND ) if( THREADS_FOUND )
list(APPEND STARPU_EXTRA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) list(APPEND STARPU_EXTRA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
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