From d738a41d27cbabecbf685507ebd0045f7077f209 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 28 Aug 2015 15:33:23 -0500 Subject: [PATCH] CMake: FindPETSC.cmake: Drop /.../include/scotch from include dirs scotch has the very unfortunate bad habit of containing a header file /usr/include/scotch/metis.h If above directory is in our list of include directories, we will accidentally pick up this header instead of /usr/include/metis.h I assume it is safe to drop /usr/include/scotch/, this should be only internally used in PETSc... --- cmake/modules/FindPETSC.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/modules/FindPETSC.cmake b/cmake/modules/FindPETSC.cmake index 9440db6e89..172ffb1919 100644 --- a/cmake/modules/FindPETSC.cmake +++ b/cmake/modules/FindPETSC.cmake @@ -1,6 +1,6 @@ ## --------------------------------------------------------------------- ## -## Copyright (C) 2012 - 2014 by the deal.II authors +## Copyright (C) 2012 - 2015 by the deal.II authors ## ## This file is part of the deal.II library. ## @@ -156,7 +156,11 @@ IF(NOT PETSC_PETSCVARIABLES MATCHES "-NOTFOUND") SET(_petsc_includes) FOREACH(_token ${_external_includes}) - IF(_token MATCHES "^-I") + # + # workaround: Do not pull in scotch include directory. It clashes with + # our use of the metis headers... + # + IF(_token MATCHES "^-I" AND NOT _token MATCHES "scotch$") STRING(REGEX REPLACE "^-I" "" _token "${_token}") LIST(APPEND _petsc_includes ${_token}) ENDIF() -- 2.39.5