From fab2380cf7613450f3dc316856369895aa06795d Mon Sep 17 00:00:00 2001 From: maier Date: Tue, 5 Mar 2013 15:03:54 +0000 Subject: [PATCH] Unify failure handling git-svn-id: https://svn.dealii.org/branches/branch_cmake@28736 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/configure/configure_metis.cmake | 1 - deal.II/cmake/configure/configure_p4est.cmake | 8 ++++++++ deal.II/cmake/configure/configure_petsc.cmake | 9 +++++++-- deal.II/cmake/configure/configure_slepc.cmake | 9 +++++++-- deal.II/cmake/configure/configure_trilinos.cmake | 2 -- deal.II/cmake/modules/FindTRILINOS.cmake | 4 +--- 6 files changed, 23 insertions(+), 10 deletions(-) diff --git a/deal.II/cmake/configure/configure_metis.cmake b/deal.II/cmake/configure/configure_metis.cmake index 0ea8164645..75df50a4a2 100644 --- a/deal.II/cmake/configure/configure_metis.cmake +++ b/deal.II/cmake/configure/configure_metis.cmake @@ -30,7 +30,6 @@ MACRO(FEATURE_METIS_FIND_EXTERNAL var) UNSET(METIS_LIBRARY CACHE) UNSET(METIS_INCLUDE_DIR CACHE) UNSET(METIS_DIR CACHE) - UNSET(METIS_FOUND CACHE) SET(METIS_DIR "" CACHE STRING "An optional hint to a metis directory" ) diff --git a/deal.II/cmake/configure/configure_p4est.cmake b/deal.II/cmake/configure/configure_p4est.cmake index 1f30907f37..eb715a15c0 100644 --- a/deal.II/cmake/configure/configure_p4est.cmake +++ b/deal.II/cmake/configure/configure_p4est.cmake @@ -30,6 +30,14 @@ MACRO(FEATURE_P4EST_FIND_EXTERNAL var) "Could not find a sufficient p4est installation: " "P4est has to be configured with MPI support enabled.\n\n" ) + UNSET(P4EST_DIR CACHE) + UNSET(P4EST_LIBRARY CACHE) + UNSET(P4EST_INCLUDE_DIR CACHE) + UNSET(SC_LIBRARY CACHE) + UNSET(SC_INCLUDE_DIR CACHE) + SET(P4EST_DIR "" CACHE STRING + "An optional hint to a p4est installation/directory" + ) ELSE() SET(${var} TRUE) ENDIF() diff --git a/deal.II/cmake/configure/configure_petsc.cmake b/deal.II/cmake/configure/configure_petsc.cmake index 8889afb6ca..7d6244f5d8 100644 --- a/deal.II/cmake/configure/configure_petsc.cmake +++ b/deal.II/cmake/configure/configure_petsc.cmake @@ -59,8 +59,13 @@ MACRO(FEATURE_PETSC_FIND_EXTERNAL var) IF(NOT ${var}) UNSET(PETSC_INCLUDE_DIR_ARCH CACHE) UNSET(PETSC_INCLUDE_DIR_COMMON CACHE) - UNSET(PETSC_INCLUDE_DIRS CACHE) - UNSET(PETSC_LIBRARIES CACHE) + UNSET(PETSC_LIBRARY CACHE) + SET(PETSC_DIR "" CACHE STRING + "An optional hint to a PETSc directory" + ) + SET(PETSC_ARCH "" CACHE STRING + "An optional hint to a PETSc arch" + ) ENDIF() ENDIF() ENDMACRO() diff --git a/deal.II/cmake/configure/configure_slepc.cmake b/deal.II/cmake/configure/configure_slepc.cmake index cca10ba12f..e494b35af3 100644 --- a/deal.II/cmake/configure/configure_slepc.cmake +++ b/deal.II/cmake/configure/configure_slepc.cmake @@ -35,8 +35,13 @@ MACRO(FEATURE_SLEPC_FIND_EXTERNAL var) ) UNSET(SLEPC_INCLUDE_DIR_ARCH CACHE) UNSET(SLEPC_INCLUDE_DIR_COMMON CACHE) - UNSET(SLEPC_INCLUDE_DIRS CACHE) - UNSET(SLEPC_LIBRARIES CACHE) + UNSET(SLEPC_LIBRARY CACHE) + SET(SLEPC_DIR "" CACHE STRING + "An optional hint to a SLEPc directory" + ) + SET(SLEPC_ARCH "" CACHE STRING + "An optional hint to a SLEPc arch" + ) SET(${var} FALSE) ENDIF() diff --git a/deal.II/cmake/configure/configure_trilinos.cmake b/deal.II/cmake/configure/configure_trilinos.cmake index aa36d5eb51..e76906e104 100644 --- a/deal.II/cmake/configure/configure_trilinos.cmake +++ b/deal.II/cmake/configure/configure_trilinos.cmake @@ -150,8 +150,6 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var) IF(NOT ${var}) UNSET(TRILINOS_DIR CACHE) - UNSET(TRILINOS_INCLUDE_DIRS CACHE) - UNSET(TRILINOS_LIBRARIES CACHE) ENDIF() ENDIF(TRILINOS_FOUND) ENDMACRO() diff --git a/deal.II/cmake/modules/FindTRILINOS.cmake b/deal.II/cmake/modules/FindTRILINOS.cmake index b723a6b4a4..1ebd599e02 100644 --- a/deal.II/cmake/modules/FindTRILINOS.cmake +++ b/deal.II/cmake/modules/FindTRILINOS.cmake @@ -17,7 +17,7 @@ # # This module exports: # -# TRILINOS_DIR +# TRILINOS_DIR (cached) # TRILINOS_INCLUDE_DIRS # TRILINOS_LIBRARIES # TRILINOS_VERSION_MAJOR @@ -119,8 +119,6 @@ IF(TRILINOS_FOUND) MARK_AS_ADVANCED( TRILINOS_DIR - TRILINOS_INCLUDE_DIRS - TRILINOS_LIBRARIES ) ELSE() -- 2.39.5