From bbe203e89c8c694491a37554652a4309cf82e1b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich@dune-project.org> Date: Tue, 3 Feb 2015 22:07:41 +0100 Subject: [PATCH] [CMake] Don't add -lm to METIS_LIBRARY if this is not found. --- cmake/modules/FindMETIS.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/FindMETIS.cmake b/cmake/modules/FindMETIS.cmake index fd8029674..fbbe35cb5 100644 --- a/cmake/modules/FindMETIS.cmake +++ b/cmake/modules/FindMETIS.cmake @@ -48,7 +48,7 @@ find_library(METIS_LIBRARY ${METIS_LIB_NAME} ) # we need to check whether we need to link m, copy the lazy solution from FindBLAS and FindLAPACK here. -if(NOT WIN32) +if(METIS_LIBRARY AND NOT WIN32) list(APPEND METIS_LIBRARY "-lm") endif() -- GitLab