Commit 574e0c33 authored by Florent Pruvost's avatar Florent Pruvost
Browse files

more general conditions to look for gfortran or ifcore library

parent 8e77fc8b
...@@ -303,17 +303,17 @@ if (LAPACK_FOUND) ...@@ -303,17 +303,17 @@ if (LAPACK_FOUND)
list(APPEND REQUIRED_LDFLAGS "${LAPACK_LINKER_FLAGS}") list(APPEND REQUIRED_LDFLAGS "${LAPACK_LINKER_FLAGS}")
endif() endif()
# Fortran # Fortran
if (CMAKE_Fortran_COMPILER MATCHES ".+gfortran.*") if (CMAKE_C_COMPILER_ID MATCHES "GNU")
find_library( find_library(
FORTRAN_gfortran_LIBRARY FORTRAN_gfortran_LIBRARY
NAMES gfortran NAMES gfortran
HINTS ${_lib_env} HINTS ${_lib_env}
) )
mark_as_advanced(FORTRAN_gfortran_LIBRARY) mark_as_advanced(FORTRAN_gfortran_LIBRARY)
if (FORTRAN_gfortran_LIBRARY AND CMAKE_C_COMPILER_ID STREQUAL "GNU") if (FORTRAN_gfortran_LIBRARY)
list(APPEND REQUIRED_LIBS "-lgfortran") list(APPEND REQUIRED_LIBS "${FORTRAN_gfortran_LIBRARY}")
endif() endif()
elseif (CMAKE_Fortran_COMPILER MATCHES ".+ifort.*") elseif (CMAKE_C_COMPILER_ID MATCHES "Intel")
find_library( find_library(
FORTRAN_ifcore_LIBRARY FORTRAN_ifcore_LIBRARY
NAMES ifcore NAMES ifcore
...@@ -321,7 +321,7 @@ if (LAPACK_FOUND) ...@@ -321,7 +321,7 @@ if (LAPACK_FOUND)
) )
mark_as_advanced(FORTRAN_ifcore_LIBRARY) mark_as_advanced(FORTRAN_ifcore_LIBRARY)
if (FORTRAN_ifcore_LIBRARY) if (FORTRAN_ifcore_LIBRARY)
list(APPEND REQUIRED_LIBS "-lifcore") list(APPEND REQUIRED_LIBS "${FORTRAN_ifcore_LIBRARY}")
endif() endif()
endif() endif()
# m # m
......
...@@ -582,17 +582,17 @@ if(MUMPS_LIBRARIES) ...@@ -582,17 +582,17 @@ if(MUMPS_LIBRARIES)
list(APPEND REQUIRED_LIBS "${METIS_LIBRARIES}") list(APPEND REQUIRED_LIBS "${METIS_LIBRARIES}")
endif() endif()
# Fortran # Fortran
if (CMAKE_Fortran_COMPILER MATCHES ".+gfortran.*") if (CMAKE_C_COMPILER_ID MATCHES "GNU")
find_library( find_library(
FORTRAN_gfortran_LIBRARY FORTRAN_gfortran_LIBRARY
NAMES gfortran NAMES gfortran
HINTS ${_lib_env} HINTS ${_lib_env}
) )
mark_as_advanced(FORTRAN_gfortran_LIBRARY) mark_as_advanced(FORTRAN_gfortran_LIBRARY)
if (FORTRAN_gfortran_LIBRARY AND CMAKE_C_COMPILER_ID STREQUAL "GNU") if (FORTRAN_gfortran_LIBRARY)
list(APPEND REQUIRED_LIBS "-lgfortran") list(APPEND REQUIRED_LIBS "${FORTRAN_gfortran_LIBRARY}")
endif() endif()
elseif (CMAKE_Fortran_COMPILER MATCHES ".+ifort.*") elseif (CMAKE_C_COMPILER_ID MATCHES "Intel")
find_library( find_library(
FORTRAN_ifcore_LIBRARY FORTRAN_ifcore_LIBRARY
NAMES ifcore NAMES ifcore
...@@ -600,7 +600,7 @@ if(MUMPS_LIBRARIES) ...@@ -600,7 +600,7 @@ if(MUMPS_LIBRARIES)
) )
mark_as_advanced(FORTRAN_ifcore_LIBRARY) mark_as_advanced(FORTRAN_ifcore_LIBRARY)
if (FORTRAN_ifcore_LIBRARY) if (FORTRAN_ifcore_LIBRARY)
list(APPEND REQUIRED_LIBS "-lifcore") list(APPEND REQUIRED_LIBS "${FORTRAN_ifcore_LIBRARY}")
endif() endif()
endif() endif()
# EXTRA LIBS such that pthread, m, rt # EXTRA LIBS such that pthread, m, rt
......
...@@ -528,17 +528,17 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT PARSEC_FOUND) ...@@ -528,17 +528,17 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT PARSEC_FOUND)
list(APPEND REQUIRED_LIBS "${CUDA_CUBLAS_LIBRARIES};${CUDA_CUDART_LIBRARY};${CUDA_CUDA_LIBRARY}") list(APPEND REQUIRED_LIBS "${CUDA_CUBLAS_LIBRARIES};${CUDA_CUDART_LIBRARY};${CUDA_CUDA_LIBRARY}")
endif() endif()
# Fortran # Fortran
if (CMAKE_Fortran_COMPILER MATCHES ".+gfortran.*") if (CMAKE_C_COMPILER_ID MATCHES "GNU")
find_library( find_library(
FORTRAN_gfortran_LIBRARY FORTRAN_gfortran_LIBRARY
NAMES gfortran NAMES gfortran
HINTS ${_lib_env} HINTS ${_lib_env}
) )
mark_as_advanced(FORTRAN_gfortran_LIBRARY) mark_as_advanced(FORTRAN_gfortran_LIBRARY)
if (FORTRAN_gfortran_LIBRARY AND CMAKE_C_COMPILER_ID STREQUAL "GNU") if (FORTRAN_gfortran_LIBRARY)
list(APPEND REQUIRED_LIBS "-lgfortran") list(APPEND REQUIRED_LIBS "${FORTRAN_gfortran_LIBRARY}")
endif() endif()
elseif (CMAKE_Fortran_COMPILER MATCHES ".+ifort.*") elseif (CMAKE_C_COMPILER_ID MATCHES "Intel")
find_library( find_library(
FORTRAN_ifcore_LIBRARY FORTRAN_ifcore_LIBRARY
NAMES ifcore NAMES ifcore
...@@ -546,7 +546,7 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT PARSEC_FOUND) ...@@ -546,7 +546,7 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT PARSEC_FOUND)
) )
mark_as_advanced(FORTRAN_ifcore_LIBRARY) mark_as_advanced(FORTRAN_ifcore_LIBRARY)
if (FORTRAN_ifcore_LIBRARY) if (FORTRAN_ifcore_LIBRARY)
list(APPEND REQUIRED_LIBS "-lifcore") list(APPEND REQUIRED_LIBS "${FORTRAN_ifcore_LIBRARY}")
endif() endif()
endif() endif()
# EXTRA LIBS such that pthread, m, rt # EXTRA LIBS such that pthread, m, rt
......
...@@ -616,17 +616,17 @@ if(PASTIX_LIBRARIES) ...@@ -616,17 +616,17 @@ if(PASTIX_LIBRARIES)
list(APPEND REQUIRED_LIBS "${METIS_LIBRARIES}") list(APPEND REQUIRED_LIBS "${METIS_LIBRARIES}")
endif() endif()
# Fortran # Fortran
if (CMAKE_Fortran_COMPILER MATCHES ".+gfortran.*") if (CMAKE_C_COMPILER_ID MATCHES "GNU")
find_library( find_library(
FORTRAN_gfortran_LIBRARY FORTRAN_gfortran_LIBRARY
NAMES gfortran NAMES gfortran
HINTS ${_lib_env} HINTS ${_lib_env}
) )
mark_as_advanced(FORTRAN_gfortran_LIBRARY) mark_as_advanced(FORTRAN_gfortran_LIBRARY)
if (FORTRAN_gfortran_LIBRARY AND CMAKE_C_COMPILER_ID STREQUAL "GNU") if (FORTRAN_gfortran_LIBRARY)
list(APPEND REQUIRED_LIBS "-lgfortran") list(APPEND REQUIRED_LIBS "${FORTRAN_gfortran_LIBRARY}")
endif() endif()
elseif (CMAKE_Fortran_COMPILER MATCHES ".+ifort.*") elseif (CMAKE_C_COMPILER_ID MATCHES "Intel")
find_library( find_library(
FORTRAN_ifcore_LIBRARY FORTRAN_ifcore_LIBRARY
NAMES ifcore NAMES ifcore
...@@ -634,7 +634,7 @@ if(PASTIX_LIBRARIES) ...@@ -634,7 +634,7 @@ if(PASTIX_LIBRARIES)
) )
mark_as_advanced(FORTRAN_ifcore_LIBRARY) mark_as_advanced(FORTRAN_ifcore_LIBRARY)
if (FORTRAN_ifcore_LIBRARY) if (FORTRAN_ifcore_LIBRARY)
list(APPEND REQUIRED_LIBS "-lifcore") list(APPEND REQUIRED_LIBS "${FORTRAN_ifcore_LIBRARY}")
endif() endif()
endif() endif()
# EXTRA LIBS such that pthread, m, rt # EXTRA LIBS such that pthread, m, rt
......
...@@ -749,7 +749,7 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) ...@@ -749,7 +749,7 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND)
endif() endif()
endif() endif()
# Fortran # Fortran
if (CMAKE_Fortran_COMPILER MATCHES ".+gfortran.*") if (CMAKE_C_COMPILER_ID MATCHES "GNU")
find_library( find_library(
FORTRAN_gfortran_LIBRARY FORTRAN_gfortran_LIBRARY
NAMES gfortran NAMES gfortran
...@@ -757,9 +757,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) ...@@ -757,9 +757,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND)
) )
mark_as_advanced(FORTRAN_gfortran_LIBRARY) mark_as_advanced(FORTRAN_gfortran_LIBRARY)
if (FORTRAN_gfortran_LIBRARY AND CMAKE_C_COMPILER_ID STREQUAL "GNU") if (FORTRAN_gfortran_LIBRARY AND CMAKE_C_COMPILER_ID STREQUAL "GNU")
list(APPEND REQUIRED_LIBS "-lgfortran") list(APPEND REQUIRED_LIBS "${FORTRAN_gfortran_LIBRARY}")
endif() endif()
elseif (CMAKE_Fortran_COMPILER MATCHES ".+ifort.*") elseif (CMAKE_C_COMPILER_ID MATCHES "Intel")
find_library( find_library(
FORTRAN_ifcore_LIBRARY FORTRAN_ifcore_LIBRARY
NAMES ifcore NAMES ifcore
...@@ -767,7 +767,7 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) ...@@ -767,7 +767,7 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND)
) )
mark_as_advanced(FORTRAN_ifcore_LIBRARY) mark_as_advanced(FORTRAN_ifcore_LIBRARY)
if (FORTRAN_ifcore_LIBRARY) if (FORTRAN_ifcore_LIBRARY)
list(APPEND REQUIRED_LIBS "-lifcore") list(APPEND REQUIRED_LIBS "${FORTRAN_ifcore_LIBRARY}")
endif() endif()
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