From b595dd0abd1a5d1d080ab25fe394d4da66a9a61e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Kvalsvk?= Date: Tue, 16 Sep 2014 11:39:18 +0000 Subject: [PATCH] FindPets searches default paths w/ general namings Removed the NO_DEFAULT_PATH flag as this really isn't working for most systems (where PETSc will be installed from a repository and in /usr or /). Path suffix parameters extended to accept more version-less configs too, to be compatible with a default PETSc (debian style) install. --- cmake/Modules/FindPetsc.cmake | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cmake/Modules/FindPetsc.cmake b/cmake/Modules/FindPetsc.cmake index 63c2b652..590097b0 100644 --- a/cmake/Modules/FindPetsc.cmake +++ b/cmake/Modules/FindPetsc.cmake @@ -70,16 +70,14 @@ if (NOT PETSC_NORMAL_INCLUDE_DIR) find_path (PETSC_NORMAL_INCLUDE_DIR NAMES "petsc.h" PATHS ${PETSC_ROOT} - PATH_SUFFIXES "petsc-3.4.4" "include" - NO_DEFAULT_PATH + PATH_SUFFIXES "petsc-3.4.4" "include" "petsc" ) endif (NOT PETSC_NORMAL_INCLUDE_DIR) if (NOT PETSC_MPIUNI_INCLUDE_DIR) find_path (PETSC_MPIUNI_INCLUDE_DIR NAMES "mpi.h" - PATHS ${PETSC_ROOT}/include - PATH_SUFFIXES "mpiuni" - NO_DEFAULT_PATH + PATHS ${PETSC_ROOT} + PATH_SUFFIXES "mpiuni" "mpi" ) endif (NOT PETSC_MPIUNI_INCLUDE_DIR) # look for actual Petsc library @@ -88,7 +86,6 @@ if (NOT PETSC_LIBRARY) NAMES "petsc-3.4.3" "petsc-3.4.4" "petsc" PATHS ${PETSC_ROOT} PATH_SUFFIXES "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" - NO_DEFAULT_PATH ) endif() if(NOT PETSC_LIBRARY)