From af8e3dd90646a5ab61535ff2e4ddeae665417033 Mon Sep 17 00:00:00 2001 From: maier Date: Thu, 3 Oct 2013 22:06:49 +0000 Subject: [PATCH] Bugfix: Only include libparmetis to the link interface if its likely that it belongs to the metis library.. git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31107 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/modules/FindMETIS.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/deal.II/cmake/modules/FindMETIS.cmake b/deal.II/cmake/modules/FindMETIS.cmake index 29c9be531f..005905aecc 100644 --- a/deal.II/cmake/modules/FindMETIS.cmake +++ b/deal.II/cmake/modules/FindMETIS.cmake @@ -78,7 +78,14 @@ MARK_AS_ADVANCED( IF(METIS_FOUND) - IF(NOT PARMETIS_LIBRARY MATCHES "-NOTFOUND") + # + # Sanity check: Only include parmetis library if it is in the same + # directory as the metis library... + # + GET_FILENAME_COMPONENT(_path1 "${PARMETIS_LIBRARY}" PATH) + GET_FILENAME_COMPONENT(_path2 "${ETIS_LIBRARY}" PATH) + IF( NOT PARMETIS_LIBRARY MATCHES "-NOTFOUND" + AND "${_path1}" STREQUAL "${_path2}" ) SET(METIS_LIBRARIES ${PARMETIS_LIBRARY}) ENDIF() -- 2.39.5