]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: FindPETSC.cmake: Drop /.../include/scotch from include dirs
authorMatthias Maier <tamiko@43-1.org>
Fri, 28 Aug 2015 20:33:23 +0000 (15:33 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 28 Aug 2015 20:38:54 +0000 (15:38 -0500)
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

index 9440db6e89640145b5a353f20735051a2d0d894f..172ffb1919cb54292443d27e793a6e25e1d67896 100644 (file)
@@ -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()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.