Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 1ddac231 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

add libs z, m and rt for scotch function test only if discovered on the system

parent 062ec172
No related branches found
No related tags found
No related merge requests found
......@@ -264,10 +264,21 @@ if(PTSCOTCH_LIBRARIES)
if(CMAKE_THREAD_LIBS_INIT)
list(APPEND REQUIRED_LIBS "${CMAKE_THREAD_LIBS_INIT}")
endif()
if(UNIX OR WIN32)
set(Z_LIBRARY "Z_LIBRARY-NOTFOUND")
find_library(Z_LIBRARY NAMES z)
if(Z_LIBRARY)
list(APPEND REQUIRED_LIBS "-lz")
endif()
set(M_LIBRARY "M_LIBRARY-NOTFOUND")
find_library(M_LIBRARY NAMES m)
if(M_LIBRARY)
list(APPEND REQUIRED_LIBS "-lm")
endif()
list(APPEND REQUIRED_LIBS "-lz -lrt")
set(RT_LIBRARY "RT_LIBRARY-NOTFOUND")
find_library(RT_LIBRARY NAMES rt)
if(RT_LIBRARY)
list(APPEND REQUIRED_LIBS "-lrt")
endif()
# set required libraries for link
set(CMAKE_REQUIRED_INCLUDES "${REQUIRED_INCDIRS}")
......
......@@ -233,10 +233,21 @@ if(SCOTCH_LIBRARIES)
if(CMAKE_THREAD_LIBS_INIT)
list(APPEND REQUIRED_LIBS "${CMAKE_THREAD_LIBS_INIT}")
endif()
if(UNIX OR WIN32)
set(Z_LIBRARY "Z_LIBRARY-NOTFOUND")
find_library(Z_LIBRARY NAMES z)
if(Z_LIBRARY)
list(APPEND REQUIRED_LIBS "-lz")
endif()
set(M_LIBRARY "M_LIBRARY-NOTFOUND")
find_library(M_LIBRARY NAMES m)
if(M_LIBRARY)
list(APPEND REQUIRED_LIBS "-lm")
endif()
list(APPEND REQUIRED_LIBS "-lz -lrt")
set(RT_LIBRARY "RT_LIBRARY-NOTFOUND")
find_library(RT_LIBRARY NAMES rt)
if(RT_LIBRARY)
list(APPEND REQUIRED_LIBS "-lrt")
endif()
# set required libraries for link
set(CMAKE_REQUIRED_INCLUDES "${REQUIRED_INCDIRS}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment