]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Some minor cleanup
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 26 Apr 2014 12:28:38 +0000 (12:28 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 26 Apr 2014 12:28:38 +0000 (12:28 +0000)
git-svn-id: https://svn.dealii.org/trunk@32843 0785d39b-7218-0410-832d-ea1e28bc413d

15 files changed:
deal.II/cmake/configure/configure_1_bzip2.cmake
deal.II/cmake/modules/FindARPACK.cmake
deal.II/cmake/modules/FindDEALII_LAPACK.cmake
deal.II/cmake/modules/FindHDF5.cmake
deal.II/cmake/modules/FindMETIS.cmake
deal.II/cmake/modules/FindMUMPS.cmake
deal.II/cmake/modules/FindMUPARSER.cmake
deal.II/cmake/modules/FindNETCDF.cmake
deal.II/cmake/modules/FindP4EST.cmake
deal.II/cmake/modules/FindPETSC.cmake
deal.II/cmake/modules/FindSCALAPACK.cmake
deal.II/cmake/modules/FindSLEPC.cmake
deal.II/cmake/modules/FindTBB.cmake
deal.II/cmake/modules/FindTRILINOS.cmake
deal.II/cmake/modules/FindUMFPACK.cmake

index a905aad144d8b5e07a0b41245f65ea234b55b7fe..37a0f813050bb092b4d8f83c9d919b4ba2cd3cfa 100644 (file)
@@ -15,7 +15,7 @@
 ## ---------------------------------------------------------------------
 
 #
-# Configuration for the zlib library:
+# Configuration for the bzip2 library:
 #
 
 MACRO(FEATURE_BZIP2_FIND_EXTERNAL var)
index 7e8da720905a151e4119b078cd22700671beca18..61af946b969f76516ee43444b47f0540f5109352 100644 (file)
@@ -29,6 +29,7 @@
 
 INCLUDE(FindPackageHandleStandardArgs)
 
+SET(ARPACK_DIR "" CACHE PATH "An optional hint to an ARPACK installation")
 SET_IF_EMPTY(ARPACK_DIR "$ENV{ARPACK_DIR}")
 
 FIND_LIBRARY(ARPACK_LIBRARY
@@ -51,18 +52,9 @@ MARK_AS_ADVANCED(
   )
 
 IF(ARPACK_FOUND)
-  SET(ARPACK_LIBRARIES
-    ${ARPACK_LIBRARY}
-    ${LAPACK_LIBRARIES}
-    )
-  SET(ARPACK_LINKER_FLAGS
-    ${LAPACK_LINKER_FLAGS}
-    )
+  SET(ARPACK_LIBRARIES ${ARPACK_LIBRARY} ${LAPACK_LIBRARIES})
+  SET(ARPACK_LINKER_FLAGS ${LAPACK_LINKER_FLAGS})
 
   MARK_AS_ADVANCED(ARPACK_DIR)
-ELSE()
-  SET(ARPACK_DIR "" CACHE PATH
-    "An optional hint to an ARPACK installation"
-    )
 ENDIF()
 
index b16cf25b137de1a19cb884de7abad7686b1a3a14..69a24aed6c7a2f674268cd2547a9afb994d99a61 100644 (file)
 # We have to use a trick with CMAKE_PREFIX_PATH to make LAPACK_DIR and
 # BLAS_DIR work...
 #
+SET(LAPACK_DIR "" CACHE PATH "An optional hint to a LAPACK installation")
+SET(BLAS_DIR "" CACHE PATH "An optional hint to a BLAS installation")
 SET_IF_EMPTY(BLAS_DIR "$ENV{BLAS_DIR}")
 SET_IF_EMPTY(LAPACK_DIR "$ENV{LAPACK_DIR}")
 
 SET(_cmake_prefix_path_backup "${CMAKE_PREFIX_PATH}")
-
 SET(CMAKE_PREFIX_PATH ${BLAS_DIR} ${LAPACK_DIR} ${_cmake_prefix_path_backup})
-
 FIND_PACKAGE(BLAS)
-
 SET(CMAKE_PREFIX_PATH ${LAPACK_DIR} ${_cmake_prefix_path_backup})
-
 FIND_PACKAGE(LAPACK)
-
 SET(CMAKE_PREFIX_PATH ${_cmake_prefix_path_backup})
 
 MARK_AS_ADVANCED(
@@ -107,26 +104,15 @@ IF(LAPACK_FOUND)
   ENDIF()
   LIST(REMOVE_ITEM LAPACK_LIBRARIES "FALSE")
 
-  MARK_AS_ADVANCED(
-    BLAS_DIR
-    LAPACK_DIR
-    )
+  MARK_AS_ADVANCED( BLAS_DIR LAPACK_DIR)
 
 ELSE()
   SET(DEALII_LAPACK_FOUND FALSE)
 
-  SET(LAPACK_DIR "" CACHE PATH
-    "An optional hint to a LAPACK installation"
-    )
-  SET(BLAS_DIR "" CACHE PATH
-    "An optional hint to a BLAS installation"
-    )
-
   #
   # Clean up the library variables in case we couldn't find the libraries
   # to avoid spurious inclusions of "-NOTFOUND" or "FALSE":
   #
   SET(BLAS_LIBRARIES)
   SET(LAPACK_LIBRARIES)
-
 ENDIF()
index 66417e3c33ba77b71d4529edd66959182d8cdba3..b3437c99526b9056db37d9c1fd3b7e644b01f73b 100644 (file)
@@ -26,6 +26,7 @@
 
 INCLUDE(FindPackageHandleStandardArgs)
 
+SET(HDF5_DIR "" CACHE PATH "An optional hint to an hdf5 directory")
 SET_IF_EMPTY(HDF5_DIR "$ENV{HDF5_DIR}")
 
 FIND_PATH(HDF5_INCLUDE_DIR hdf5.h
@@ -74,20 +75,15 @@ MARK_AS_ADVANCED(
   )
 
 IF(HDF5_FOUND)
-  SET(HDF5_INCLUDE_DIRS
-    ${HDF5_INCLUDE_DIR}
-    )
-  SET(HDF5_LIBRARIES
-    ${HDF5_HL_LIBRARY}
-    ${HDF5_LIBRARY}
-    ${MPI_C_LIBRARIES} # for good measure
-    )
+  SET(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR})
+  SET(HDF5_LIBRARIES ${HDF5_HL_LIBRARY} ${HDF5_LIBRARY} ${MPI_C_LIBRARIES})
 
   #
   # Is hdf5 compiled with support for mpi?
   #
   FILE(STRINGS ${HDF5_PUBCONF} HDF5_MPI_STRING
-    REGEX "#define.*H5_HAVE_PARALLEL 1")
+    REGEX "#define.*H5_HAVE_PARALLEL 1"
+    )
   IF("${HDF5_MPI_STRING}" STREQUAL "")
     SET(HDF5_WITH_MPI FALSE)
   ELSE()
@@ -95,9 +91,5 @@ IF(HDF5_FOUND)
   ENDIF()
 
   MARK_AS_ADVANCED(HDF5_DIR)
-ELSE()
-  SET(HDF5_DIR "" CACHE PATH
-    "An optional hint to an hdf5 directory"
-    )
 ENDIF()
 
index 005905aecce8b219afdcfd2367e941839e4cd221..a5d9e2ab18fad3d811052dd51e87a1f09cead867 100644 (file)
@@ -29,6 +29,7 @@
 
 INCLUDE(FindPackageHandleStandardArgs)
 
+SET(METIS_DIR "" CACHE PATH "An optional hint to a metis directory")
 SET_IF_EMPTY(METIS_DIR "$ENV{METIS_DIR}")
 
 #
@@ -77,7 +78,6 @@ MARK_AS_ADVANCED(
   )
 
 IF(METIS_FOUND)
-
   #
   # Sanity check: Only include parmetis library if it is in the same
   # directory as the metis library...
@@ -121,9 +121,4 @@ IF(METIS_FOUND)
     )
 
   MARK_AS_ADVANCED(METIS_DIR)
-ELSE()
-  SET(METIS_DIR "" CACHE PATH
-    "An optional hint to a metis directory"
-    )
 ENDIF()
-
index d3ae910fe7a08836e7db44f3862e67802ee5f7d3..f8de1f5154a8ce1cb350afdeea3b45737db61a3a 100644 (file)
@@ -28,6 +28,7 @@
 #   MUMPS_VERSION_SUBMINOR
 #
 
+SET(MUMPS_DIR "" CACHE PATH "An optional hint to a mumps directory")
 SET_IF_EMPTY(MUMPS_DIR "$ENV{MUMPS_DIR}")
 
 INCLUDE(FindPackageHandleStandardArgs)
@@ -105,29 +106,21 @@ MARK_AS_ADVANCED(
   DMUMPS_LIBRARY
   MUMPS_COMMON_LIBRARY
   MUMPS_INCLUDE_DIR
-  PORT_LIBRARY
+  PORD_LIBRARY
   )
 
 IF(MUMPS_FOUND)
-  SET(MUMPS_INCLUDE_DIRS
-    ${MUMPS_INCLUDE_DIR}
-    )
+  SET(MUMPS_INCLUDE_DIRS ${MUMPS_INCLUDE_DIR})
   SET(MUMPS_LIBRARIES
     ${DMUMPS_LIBRARY}
     ${MUMPS_COMMON_LIBRARY}
     ${PORD_LIBRARY}
     ${SCALAPACK_LIBRARIES}
-    ${METIS_LIBRARIES}       # for good measure
-    ${MPI_Fortran_LIBRARIES} # for good measure
-    )
-  SET(MUMPS_LINKER_FLAGS
-    ${SCALAPACK_LINKER_FLAGS}
+    ${METIS_LIBRARIES}
+    ${MPI_Fortran_LIBRARIES}
     )
+  SET(MUMPS_LINKER_FLAGS ${SCALAPACK_LINKER_FLAGS})
 
   MARK_AS_ADVANCED(MUMPS_DIR)
-ELSE()
-  SET(MUMPS_DIR "" CACHE PATH
-    "An optional hint to a mumps directory"
-    )
 ENDIF()
 
index 6bf17d2dc9a92a748d9b8fee80f5f4fb866c42ec..d9d15635d12bb46bac255855416eaced1e624c84 100644 (file)
@@ -29,6 +29,7 @@
 
 INCLUDE(FindPackageHandleStandardArgs)
 
+SET(MUPARSER_DIR "" CACHE PATH "An optional hint to a MUPARSER installation")
 SET_IF_EMPTY(MUPARSER_DIR "$ENV{MUPARSER_DIR}")
 
 FIND_LIBRARY(MUPARSER_LIBRARY
@@ -68,8 +69,4 @@ IF(MUPARSER_FOUND)
     )
 
   MARK_AS_ADVANCED(MUPARSER_DIR)
-ELSE()
-  SET(MUPARSER_DIR "" CACHE PATH
-    "An optional hint to a MUPARSER installation"
-    )
 ENDIF()
index 066decd95edf984707e5b18ede8479408c47d434..3ab2650229896701744739f3de91358d9ffcd082 100644 (file)
@@ -25,6 +25,7 @@
 
 INCLUDE(FindPackageHandleStandardArgs)
 
+SET(NETCDF_DIR "" CACHE PATH "An optional hint to a NETCDF installation")
 SET_IF_EMPTY(NETCDF_DIR "$ENV{NETCDF_DIR}")
 
 FIND_PATH(NETCDF_INCLUDE_DIR netcdfcpp.h
@@ -70,17 +71,8 @@ MARK_AS_ADVANCED(
   )
 
 IF(NETCDF_FOUND)
-  SET(NETCDF_INCLUDE_DIRS
-    ${NETCDF_INCLUDE_DIR}
-    )
-  SET(NETCDF_LIBRARIES
-    ${NETCDF_CPLUSPLUS_LIBRARY}
-    ${NETCDF_C_LIBRARY}
-    )
+  SET(NETCDF_INCLUDE_DIRS ${NETCDF_INCLUDE_DIR})
+  SET(NETCDF_LIBRARIES ${NETCDF_CPLUSPLUS_LIBRARY} ${NETCDF_C_LIBRARY})
 
   MARK_AS_ADVANCED(NETCDF_DIR)
-ELSE()
-  SET(NETCDF_DIR "" CACHE PATH
-    "An optional hint to a NETCDF installation"
-    )
 ENDIF()
index c7cab6ed1fc61f9670aa456d515bf4d4578ee7ea..db72bb22681125075d517d254b713697a1ef7dbb 100644 (file)
@@ -30,6 +30,9 @@
 
 INCLUDE(FindPackageHandleStandardArgs)
 
+SET(P4EST_DIR "" CACHE PATH
+  "An optional hint to a p4est installation/directory"
+  )
 SET_IF_EMPTY(P4EST_DIR "$ENV{P4EST_DIR}")
 SET_IF_EMPTY(SC_DIR "$ENV{SC_DIR}")
 
@@ -158,7 +161,6 @@ IF(P4EST_FOUND)
   IF("${P4EST_MPI_STRING}" STREQUAL "")
     SET(P4EST_WITH_MPI FALSE)
   ELSE()
-
     SET(P4EST_WITH_MPI TRUE)
   ENDIF()
 
@@ -191,11 +193,5 @@ IF(P4EST_FOUND)
     SET(P4EST_VERSION_PATCH "0")
   ENDIF()
 
-
   MARK_AS_ADVANCED(P4EST_DIR)
-ELSE()
-  SET(P4EST_DIR "" CACHE PATH
-    "An optional hint to a p4est installation/directory"
-    )
 ENDIF()
-
index df83255e4d98371a2608545a69317b454924452f..242a510d902d9dc2acc45a9e2e4db6a8c7f5ca98 100644 (file)
@@ -34,6 +34,8 @@
 
 INCLUDE(FindPackageHandleStandardArgs)
 
+SET(PETSC_DIR "" CACHE PATH "An optional hint to a PETSc directory")
+SET(PETSC_ARCH "" CACHE STRING "An optional hint to a PETSc arch")
 SET_IF_EMPTY(PETSC_DIR "$ENV{PETSC_DIR}")
 SET_IF_EMPTY(PETSC_ARCH "$ENV{PETSC_ARCH}")
 
@@ -182,10 +184,7 @@ MARK_AS_ADVANCED(
   )
 
 IF(PETSC_FOUND)
-  SET(PETSC_LIBRARIES
-    ${PETSC_LIBRARY}
-    ${_petsc_libraries}
-    )
+  SET(PETSC_LIBRARIES ${PETSC_LIBRARY} ${_petsc_libraries})
   SET(PETSC_INCLUDE_DIRS
     ${PETSC_INCLUDE_DIR_COMMON}
     ${PETSC_INCLUDE_DIR_ARCH}
@@ -257,12 +256,5 @@ IF(PETSC_FOUND)
     )
 
   MARK_AS_ADVANCED(PETSC_ARCH PETSC_DIR)
-ELSE()
-  SET(PETSC_DIR "" CACHE PATH
-    "An optional hint to a PETSc directory"
-    )
-  SET(PETSC_ARCH "" CACHE STRING
-    "An optional hint to a PETSc arch"
-    )
 ENDIF()
 
index 19af21abf852eb9e8a96ca9d256f2687ed3bcb63..9d91be55a6ab03f86cf3ace94438b45d404c846f 100644 (file)
@@ -25,6 +25,8 @@
 #   SCALAPACK_LINKER_FLAGS
 #
 
+SET(SCALAPACK_DIR "" CACHE PATH "An optional hint to a SCALAPACK directory")
+SET(BLACS_DIR "" CACHE PATH "An optional hint to a BLACS directory")
 SET_IF_EMPTY(SCALAPACK_DIR "$ENV{SCALAPACK_DIR}")
 SET_IF_EMPTY(BLACS_DIR "$ENV{BLACS_DIR}")
 
@@ -68,9 +70,6 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(SCALAPACK DEFAULT_MSG
   )
 
 MARK_AS_ADVANCED(
-  lapack_LIBRARY
-  atlas_LIBRARY
-  blas_LIBRARY
   SCALAPACK_LIBRARY
   BLACS_LIBRARY
   BLACSCINIT_LIBRARY
@@ -84,17 +83,8 @@ IF(SCALAPACK_FOUND)
     ${BLACS_LIBRARIES}
     ${MPI_Fortran_LIBRARIES} # for good measure
     )
-  SET(SCALAPACK_LINKER_FLAGS
-    ${LAPACK_LINKER_FLAGS}
-    )
+  SET(SCALAPACK_LINKER_FLAGS ${LAPACK_LINKER_FLAGS})
 
   MARK_AS_ADVANCED(SCALAPACK_DIR BLACS_DIR)
-ELSE()
-  SET(SCALAPACK_DIR "" CACHE PATH
-    "An optional hint to a SCALAPACK directory"
-    )
-  SET(BLACS_DIR "" CACHE PATH
-    "An optional hint to a BLACS directory"
-    )
 ENDIF()
 
index 9de3500f453cf9b2ae9dd32666458082ecc809bf..d65e6f41a125b0f3f1a76df9b2125da2bd216167 100644 (file)
@@ -31,6 +31,7 @@
 
 INCLUDE(FindPackageHandleStandardArgs)
 
+SET(SLEPC_DIR "" CACHE PATH "An optional hint to a SLEPC directory")
 SET_IF_EMPTY(SLEPC_DIR "$ENV{SLEPC_DIR}")
 SET_IF_EMPTY(PETSC_DIR "$ENV{PETSC_DIR}")
 SET_IF_EMPTY(PETSC_ARCH "$ENV{PETSC_ARCH}")
@@ -126,9 +127,5 @@ IF(SLEPC_FOUND)
     )
 
   MARK_AS_ADVANCED(SLEPC_DIR)
-ELSE()
-  SET(SLEPC_DIR "" CACHE PATH
-    "An optional hint to a SLEPC directory"
-    )
 ENDIF()
 
index 82f407417ea6b0e7eacca8e1adad20b9cd5815f3..354f968074ba6e1543587e09c648c3223456a0ee 100644 (file)
@@ -29,6 +29,7 @@
 
 INCLUDE(FindPackageHandleStandardArgs)
 
+SET(TBB_DIR "" CACHE PATH "An optional hint to a TBB installation")
 SET_IF_EMPTY(TBB_DIR "$ENV{TBB_DIR}")
 
 FIND_PATH(TBB_INCLUDE_DIR tbb/tbb_stddef.h
@@ -87,7 +88,6 @@ MARK_AS_ADVANCED(
   )
 
 IF(TBB_FOUND)
-
   IF(NOT TBB_DEBUG_LIBRARY MATCHES "-NOTFOUND")
     SET(TBB_WITH_DEBUGLIB TRUE)
     SET(TBB_LIBRARIES debug ${TBB_DEBUG_LIBRARY} optimized ${TBB_LIBRARY})
@@ -98,9 +98,5 @@ IF(TBB_FOUND)
   SET(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
 
   MARK_AS_ADVANCED(TBB_DIR)
-ELSE()
-  SET(TBB_DIR "" CACHE PATH
-    "An optional hint to a TBB installation"
-    )
 ENDIF()
 
index b6526cf4a3afc9834f1288107c60c78284b675d8..edb94438d455ecf6cbc0b9ba7962356c425f06dc 100644 (file)
@@ -33,6 +33,7 @@
 
 INCLUDE(FindPackageHandleStandardArgs)
 
+SET(TRILINOS_DIR "" CACHE PATH "An optional hint to a Trilinos installation")
 SET_IF_EMPTY(TRILINOS_DIR "$ENV{TRILINOS_DIR}")
 
 #
@@ -213,9 +214,5 @@ ELSE()
   SET(TRILINOS_LIBRARIES)
   SET(TRILINOS_INCLUDE_DIRS)
   UNSET(TRILINOS_CONFIG_DIR_SAVED CACHE)
-
-  SET(TRILINOS_DIR "" CACHE PATH
-    "An optional hint to a Trilinos installation"
-    )
 ENDIF()
 
index b4048cf40d015ae015bb643b419f4c708c95fca1..9db454866386412d73d2ec84d794c8a4ed983d43 100644 (file)
 
 INCLUDE(FindPackageHandleStandardArgs)
 
+SET(UMFPACK_DIR "" CACHE PATH "An optional hint to an UMFPACK directory")
+SET(SUITESPARSE_DIR "" CACHE PATH
+  "An optional hint to a SUITESPARSE directory"
+  )
 FOREACH(_comp SUITESPARSE SUITESPARSE_CONFIG UMFPACK AMD CHOLMOD COLAMD)
   SET_IF_EMPTY(${_comp}_DIR "$ENV{${_comp}_DIR}")
 ENDFOREACH()
@@ -206,16 +210,7 @@ IF(UMFPACK_FOUND)
     ${AMD_INCLUDE_DIR}
     ${SuiteSparse_config_INCLUDE_DIR}
     )
-  SET(UMFPACK_LINKER_FLAGS
-    ${LAPACK_LINKER_FLAGS}
-    )
+  SET(UMFPACK_LINKER_FLAGS ${LAPACK_LINKER_FLAGS})
 
   MARK_AS_ADVANCED(UMFPACK_DIR SUITESPARSE_DIR)
-ELSE()
-  SET(UMFPACK_DIR "" CACHE PATH
-    "An optional hint to an UMFPACK directory"
-    )
-  SET(SUITESPARSE_DIR "" CACHE PATH
-    "An optional hint to a SUITESPARSE directory"
-    )
 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.