diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-01-31 17:30:34 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-01-31 17:30:34 (GMT) |
commit | 13693b307c08f962d5416316b1c154bb0058529a (patch) | |
tree | 58b31c633ccd8181d94c0cc8ae9dfee8d7098561 /CMakeLists.txt | |
parent | bf473b40f57317fa60640f44c735133f58023f6a (diff) | |
download | hdf5-13693b307c08f962d5416316b1c154bb0058529a.zip hdf5-13693b307c08f962d5416316b1c154bb0058529a.tar.gz hdf5-13693b307c08f962d5416316b1c154bb0058529a.tar.bz2 |
[svn-r23211] Merge trunk CMake changes for minimum cmake version of 2.8.10. This was prompted by HDFFV-8227, OS X requires latest version of cmake for proper support.
Tested: local linux
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e49f41f..c448293 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.6) +cmake_minimum_required (VERSION 2.8.10) PROJECT (HDF5 C CXX) #----------------------------------------------------------------------------- @@ -663,7 +663,7 @@ IF (WIN32 AND NOT CYGWIN) IF (HDF5_ENABLE_THREADSAFE) # check for unsupported options IF (HDF5_ENABLE_PARALLEL) - MESSAGE (FATAL " **** Parallel and Threadsafe options are mutually exclusive **** ") + MESSAGE (FATAL_ERROR " **** Parallel and Threadsafe options are mutually exclusive **** ") ENDIF (HDF5_ENABLE_PARALLEL) SET (H5_HAVE_THREADSAFE 1) IF (H5_HAVE_IOEO) @@ -672,7 +672,7 @@ IF (WIN32 AND NOT CYGWIN) ELSE (H5_HAVE_IOEO) IF (NOT H5_HAVE_PTHREAD_H) SET (H5_HAVE_THREADSAFE 0) - MESSAGE (FATAL " **** Threadsafe option requires thread library **** ") + MESSAGE (FATAL_ERROR " **** Threadsafe option requires thread library **** ") ENDIF (NOT H5_HAVE_PTHREAD_H) ENDIF (H5_HAVE_IOEO) ENDIF (HDF5_ENABLE_THREADSAFE) @@ -748,6 +748,9 @@ SET (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _") IF (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran") OPTION (HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF) IF (HDF5_BUILD_FORTRAN) + IF (BUILD_SHARED_LIBS AND APPLE) + MESSAGE (FATAL_ERROR " **** Shared FORTRAN libraries are unsupported **** ") + ENDIF (BUILD_SHARED_LIBS AND APPLE) OPTION (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" OFF) INCLUDE (${HDF5_RESOURCES_DIR}/HDF5UseFortran.cmake) ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/fortran ${PROJECT_BINARY_DIR}/fortran) @@ -778,7 +781,7 @@ IF (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") IF (HDF5_BUILD_CPP_LIB) # check for unsupported options IF (HDF5_ENABLE_PARALLEL) - MESSAGE (FATAL " **** Parallel and C++ options are mutually exclusive **** ") + MESSAGE (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive **** ") ENDIF (HDF5_ENABLE_PARALLEL) IF (CMAKE_NO_STD_NAMESPACE) SET (H5_NO_STD 1) @@ -980,7 +983,6 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) SET (CPACK_PACKAGE_VENDOR "HDF_Group") SET (CPACK_PACKAGE_NAME "${HDF5_PACKAGE_NAME}") SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${HDF5_PACKAGE_NAME}") - SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_NAME}-${HDF5_PACKAGE_VERSION}-${LIB_TYPE}") SET (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}") SET (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}") SET (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}") @@ -993,10 +995,15 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) SET (CPACK_PACKAGE_RELOCATABLE TRUE) IF (WIN32) + SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_NAME}-${HDF5_PACKAGE_VERSION}-${LIB_TYPE}") SET (CPACK_MONOLITHIC_INSTALL ON) SET (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}") SET (CPACK_NSIS_MODIFY_PATH ON) SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${HDF5_PACKAGE_VERSION}") + ELSEIF (APPLE) + SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) + SET (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}") + SET (CPACK_PACKAGING_INSTALL_PREFIX "/") ELSE (WIN32) SET (CPACK_PACKAGING_INSTALL_PREFIX "/usr") SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) |