Commit 27e1a9e7 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

update cmake_modules from morse_distrib/

parent 58c45370
......@@ -611,7 +611,13 @@ if( (NOT PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUND) OR NOT CHAMELEON_FOUND )
list(APPEND REQUIRED_LIBDIRS "${libdir}")
endif()
endforeach()
list(APPEND CMAKE_REQUIRED_LIBRARIES "${HWLOC_LIBRARIES}")
foreach(lib ${HWLOC_LIBRARIES})
if (EXISTS ${lib} OR ${lib} MATCHES "^-")
list(APPEND REQUIRED_LIBS "${lib}")
else()
list(APPEND REQUIRED_LIBS "-l${lib}")
endif()
endforeach()
endif()
# TMG
if (TMG_FOUND)
......
......@@ -519,7 +519,13 @@ if(PASTIX_LIBRARIES)
list(APPEND REQUIRED_LIBDIRS "${libdir}")
endif()
endforeach()
list(APPEND REQUIRED_LIBS "${HWLOC_LIBRARIES}")
foreach(lib ${HWLOC_LIBRARIES})
if (EXISTS ${lib} OR ${lib} MATCHES "^-")
list(APPEND REQUIRED_LIBS "${lib}")
else()
list(APPEND REQUIRED_LIBS "-l${lib}")
endif()
endforeach()
endif()
# BLAS
if (BLAS_FOUND)
......@@ -569,12 +575,6 @@ if(PASTIX_LIBRARIES)
endforeach()
list(APPEND REQUIRED_LIBS "${METIS_LIBRARIES}")
endif()
# Fortran
if (CMAKE_Fortran_COMPILER MATCHES ".+gfortran.*")
list(APPEND REQUIRED_LIBS "-lgfortran")
elseif (CMAKE_Fortran_COMPILER MATCHES ".+ifort.*")
list(APPEND REQUIRED_LIBS "-lifcore")
endif()
# EXTRA LIBS such that pthread, m, rt
list(APPEND REQUIRED_LIBS ${PASTIX_EXTRA_LIBRARIES})
......
......@@ -234,7 +234,6 @@ if(PTSCOTCH_LIBRARIES)
endif()
list(APPEND REQUIRED_LIBS "${MPI_C_LIBRARIES}")
endif()
endif()
# THREADS
if(CMAKE_THREAD_LIBS_INIT)
list(APPEND REQUIRED_LIBS "${CMAKE_THREAD_LIBS_INIT}")
......
......@@ -235,7 +235,13 @@ if(QUARK_LIBRARIES)
if (HWLOC_LIBRARY_DIRS)
list(APPEND REQUIRED_LIBDIRS "${HWLOC_LIBRARY_DIRS}")
endif()
list(APPEND REQUIRED_LIBS "${HWLOC_LIBRARIES}")
foreach(lib ${HWLOC_LIBRARIES})
if (EXISTS ${lib} OR ${lib} MATCHES "^-")
list(APPEND REQUIRED_LIBS "${lib}")
else()
list(APPEND REQUIRED_LIBS "-l${lib}")
endif()
endforeach()
endif()
# THREADS
list(APPEND REQUIRED_LIBS "${CMAKE_THREAD_LIBS_INIT}")
......
......@@ -626,7 +626,13 @@ if( (NOT PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) OR
if (HWLOC_LIBRARY_DIRS)
list(APPEND REQUIRED_LIBDIRS "${HWLOC_LIBRARY_DIRS}")
endif()
list(APPEND REQUIRED_LIBS "${HWLOC_LIBRARIES}")
foreach(lib ${HWLOC_LIBRARIES})
if (EXISTS ${lib} OR ${lib} MATCHES "^-")
list(APPEND REQUIRED_LIBS "${lib}")
else()
list(APPEND REQUIRED_LIBS "-l${lib}")
endif()
endforeach()
endif()
# MPI
if (MPI_FOUND AND STARPU_LOOK_FOR_MPI)
......@@ -680,7 +686,13 @@ if( (NOT PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) OR
if (FXT_LIBRARY_DIRS)
list(APPEND REQUIRED_LIBDIRS "${FXT_LIBRARY_DIRS}")
endif()
list(APPEND REQUIRED_LIBS "${FXT_LIBRARIES}")
foreach(lib ${FXT_LIBRARIES})
if (EXISTS ${lib} OR ${lib} MATCHES "^-")
list(APPEND REQUIRED_LIBS "${lib}")
else()
list(APPEND REQUIRED_LIBS "-l${lib}")
endif()
endforeach()
endif()
# BLAS
if (BLAS_FOUND AND STARPU_LOOK_FOR_BLAS)
......
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