Removes broken conditional check.

The FindPetsc module would check for a PETSC_ROOT and not attempt to look for
mpi and the petsc header if this was not set, which it in most cases won't be.
If the variable is set then the conditional include is redundant, as it will
search the explicitly passed paths first anyways.
This commit is contained in:
Jørgen Kvalsvk 2014-09-16 11:37:59 +00:00 committed by Atgeirr Flø Rasmussen
parent 2de1568a33
commit 33914bcceb

View File

@ -67,24 +67,20 @@ if (Petsc_ROOT)
set (PETSC_ROOT "${Petsc_ROOT}") set (PETSC_ROOT "${Petsc_ROOT}")
endif (Petsc_ROOT) endif (Petsc_ROOT)
if (NOT PETSC_NORMAL_INCLUDE_DIR) if (NOT PETSC_NORMAL_INCLUDE_DIR)
if (PETSC_ROOT)
find_path (PETSC_NORMAL_INCLUDE_DIR find_path (PETSC_NORMAL_INCLUDE_DIR
NAMES "petsc.h" NAMES "petsc.h"
PATHS ${PETSC_ROOT} PATHS ${PETSC_ROOT}
PATH_SUFFIXES "petsc-3.4.4" "include" PATH_SUFFIXES "petsc-3.4.4" "include"
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
endif (PETSC_ROOT)
endif (NOT PETSC_NORMAL_INCLUDE_DIR) endif (NOT PETSC_NORMAL_INCLUDE_DIR)
if (NOT PETSC_MPIUNI_INCLUDE_DIR) if (NOT PETSC_MPIUNI_INCLUDE_DIR)
if (PETSC_ROOT)
find_path (PETSC_MPIUNI_INCLUDE_DIR find_path (PETSC_MPIUNI_INCLUDE_DIR
NAMES "mpi.h" NAMES "mpi.h"
PATHS ${PETSC_ROOT}/include PATHS ${PETSC_ROOT}/include
PATH_SUFFIXES "mpiuni" PATH_SUFFIXES "mpiuni"
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
endif (PETSC_ROOT)
endif (NOT PETSC_MPIUNI_INCLUDE_DIR) endif (NOT PETSC_MPIUNI_INCLUDE_DIR)
# look for actual Petsc library # look for actual Petsc library
if (NOT PETSC_LIBRARY) if (NOT PETSC_LIBRARY)