]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make FindPETSC.cmake work with the gentoo petsc package
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 28 Sep 2012 23:02:14 +0000 (23:02 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 28 Sep 2012 23:02:14 +0000 (23:02 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26873 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/modules/FindPETSC.cmake

index cb32527e01b5c54b0b3595dc5fefe813bd7576e7..749d41a867ce05de50323b357e15c6d1d6dc9336 100644 (file)
@@ -31,10 +31,13 @@ SET_IF_EMPTY(PETSC_ARCH "$ENV{PETSC_ARCH}")
 #   heck? If its not the same library you're linking against, you cannot
 #   assume to be API compatible, so why not just give a list of libraries?
 #
+# - It is not even considered to be installed in the gentoo petsc package
+#   :-]
+#
 
 #
 # TODO: We'll have to guess which external libraries we'll have to link
-# against someday...
+# against someday to avoid underlinkage
 #
 
 #
@@ -43,6 +46,7 @@ SET_IF_EMPTY(PETSC_ARCH "$ENV{PETSC_ARCH}")
 FIND_PATH(PETSC_INCLUDE_DIR_ARCH petscconf.h
   HINTS
     # petsc is special. Account for that
+    ${PETSC_DIR}
     ${PETSC_DIR}/${PETSC_ARCH}/include
     ${PETSC_INCLUDE_DIRS}
   PATH_SUFFIXES petsc
@@ -52,11 +56,11 @@ FIND_LIBRARY(PETSC_LIBRARIES
   NAMES petsc
   HINTS
     # petsc is special. Account for that
+    ${PETSC_DIR}
     ${PETSC_DIR}/${PETSC_ARCH}
   PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
 )
 
-
 #
 # So, up to this point it was easy. Now, the tricky part.
 # If petsc is not installed, but a source tree is given by PETSC_DIR petsc
@@ -93,23 +97,13 @@ ENDIF()
 FIND_FILE(PETSC_PETSCVERSION_H petscversion.h
   HINTS
     ${PETSC_INCLUDE_DIRS}
-    NO_DEFAULT_PATH
-    NO_CMAKE_ENVIRONMENT_PATH
-    NO_CMAKE_PATH
-    NO_SYSTEM_ENVIRONMENT_PATH
-    NO_CMAKE_SYSTEM_PATH
-    NO_CMAKE_FIND_ROOT_PATH
+  PATH_SUFFIXES petsc
   )
 
 FIND_FILE(PETSC_PETSCCONF_H petscconf.h
   HINTS
     ${PETSC_INCLUDE_DIRS}
-    NO_DEFAULT_PATH
-    NO_CMAKE_ENVIRONMENT_PATH
-    NO_CMAKE_PATH
-    NO_SYSTEM_ENVIRONMENT_PATH
-    NO_CMAKE_SYSTEM_PATH
-    NO_CMAKE_FIND_ROOT_PATH
+  PATH_SUFFIXES petsc
   )
 
 #

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.