diff --git a/cmake_modules/morse/find/FindMETIS.cmake b/cmake_modules/morse/find/FindMETIS.cmake index 43a16e7b034b3537785dabf69a2d62401997557e..9d026b7852d9ce2f3a19e64743e2321be9fd37af 100644 --- a/cmake_modules/morse/find/FindMETIS.cmake +++ b/cmake_modules/morse/find/FindMETIS.cmake @@ -205,6 +205,10 @@ if(METIS_LIBRARIES) set(REQUIRED_LIBDIRS "${METIS_LIBRARY_DIRS}") endif() set(REQUIRED_LIBS "${METIS_LIBRARIES}") + # m + if(UNIX OR WIN32) + list(APPEND REQUIRED_LIBS "-lm") + endif() # set required libraries for link set(CMAKE_REQUIRED_INCLUDES "${REQUIRED_INCDIRS}") diff --git a/cmake_modules/morse/find/FindPARMETIS.cmake b/cmake_modules/morse/find/FindPARMETIS.cmake index 227c178e432373a095d56e3ad1cfd7131afb5f69..36235d868fb98212d0438af3ebf77db8f382ed13 100644 --- a/cmake_modules/morse/find/FindPARMETIS.cmake +++ b/cmake_modules/morse/find/FindPARMETIS.cmake @@ -205,6 +205,10 @@ if(PARMETIS_LIBRARIES) set(REQUIRED_LIBDIRS "${PARMETIS_LIBRARY_DIRS}") endif() set(REQUIRED_LIBS "${PARMETIS_LIBRARIES}") + # m + if(UNIX OR WIN32) + list(APPEND REQUIRED_LIBS "-lm") + endif() # set required libraries for link set(CMAKE_REQUIRED_INCLUDES "${REQUIRED_INCDIRS}")