From: Matthias Maier Date: Fri, 28 Aug 2015 20:33:23 +0000 (-0500) Subject: CMake: FindPETSC.cmake: Drop /.../include/scotch from include dirs X-Git-Tag: v8.4.0-rc2~532^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d738a41d27cbabecbf685507ebd0045f7077f209;p=dealii.git 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... --- 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()