diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2015-05-04 16:56:57 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2015-05-04 16:56:57 (GMT) |
commit | 7eca206b7771c11badb957c4fe42c8cc56f746d8 (patch) | |
tree | 8e98c0e6fd39bf12aa5919a5e0364ed77e731dca /CMakeLists.txt | |
parent | d65747d78b94c9ceeda06020bf56a5e2b0cedda5 (diff) | |
download | hdf5-7eca206b7771c11badb957c4fe42c8cc56f746d8.zip hdf5-7eca206b7771c11badb957c4fe42c8cc56f746d8.tar.gz hdf5-7eca206b7771c11badb957c4fe42c8cc56f746d8.tar.bz2 |
[svn-r27007] Bring revisions #26843:26986 from trunk to revise_chunks. h5committested.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a4135f4..1cacc5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,24 @@ PROJECT (HDF5 C CXX) # set CMAKE_INSTALL_PREFIX to the required install path. # Make install can be used to install all components for system-wide use. # +if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") + MESSAGE(FATAL_ERROR "\nERROR! ${PROJECT_NAME} DOES NOT SUPPORT IN SOURCE BUILDS!\n" + "CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}" + " == CMAKE_CURRENT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}\n" + "NEXT STEPS:\n" + "(1) Delete the CMakeCache.txt file and the CMakeFiles/ directory\n" + " under the source directory for ${PROJECT_NAME}, otherwise you\n" + " will not be able to configure ${PROJECT_NAME} correctly!\n" + " * For example, on linux machines do:\n" + " $ rm -r CMakeCache.txt CMakeFiles/\n" + "(2) Create a different directory and configure ${PROJECT_NAME} in that directory.\n" + " * For example, on linux machines do:\n" + " $ mkdir MY_BUILD\n" + " $ cd MY_BUILD\n" + " $ cmake [OPTIONS] ..\n" + ) +endif () + #----------------------------------------------------------------------------- # Instructions for use : Sub-Project Build # @@ -795,6 +813,16 @@ if (BUILD_TESTING) endif (BUILD_TESTING) #----------------------------------------------------------------------------- +# Option to build HDF5 Tools +#----------------------------------------------------------------------------- +if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools") + option (HDF5_BUILD_TOOLS "Build HDF5 Tools" ON) + if (HDF5_BUILD_TOOLS) + add_subdirectory (${HDF5_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools) + endif (HDF5_BUILD_TOOLS) +endif (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools") + +#----------------------------------------------------------------------------- # Option to build examples #----------------------------------------------------------------------------- if (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples") @@ -876,16 +904,6 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") endif (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") #----------------------------------------------------------------------------- -# Option to build HDF5 Tools -#----------------------------------------------------------------------------- -if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools") - option (HDF5_BUILD_TOOLS "Build HDF5 Tools" ON) - if (HDF5_BUILD_TOOLS) - add_subdirectory (${HDF5_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools) - endif (HDF5_BUILD_TOOLS) -endif (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools") - -#----------------------------------------------------------------------------- # Check if Fortran's default real is double precision. If it is and HL is # being built then configure should fail due to bug HDFFV-889. #----------------------------------------------------------------------------- |