summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-02-06 21:30:08 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-02-06 21:30:08 (GMT)
commit78ea0a0c081a1cf07795fffa2100057538510f81 (patch)
treede3d8d848badde9bb35d937b0c42912f3a62ae5f /CMakeLists.txt
parentb7acf7dd3b44c9263476c884f57e6c0edb811c49 (diff)
downloadhdf5-78ea0a0c081a1cf07795fffa2100057538510f81.zip
hdf5-78ea0a0c081a1cf07795fffa2100057538510f81.tar.gz
hdf5-78ea0a0c081a1cf07795fffa2100057538510f81.tar.bz2
HDFFV-9875 Bring changes from develop branch
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt224
1 files changed, 114 insertions, 110 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index efd008f..d03ea86 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,13 +76,13 @@ endif ()
# # Override the zlib header file
# if (VTK_USE_SYSTEM_ZLIB)
# set (H5_ZLIB_HEADER "zlib.h")
-# else (VTK_USE_SYSTEM_ZLIB)
+# else ()
# set (H5_ZLIB_HEADER "vtk_zlib.h")
# # Set vars that FindZlib would have set if used in sub project
# set (ZLIB_INCLUDE_DIRS "${VTK_ZLIB_INCLUDE_DIRS}")
# set (ZLIB_LIBRARIES vtkzlib)
-# endif (VTK_USE_SYSTEM_ZLIB)
-# endif (HDF5_ENABLE_Z_LIB_SUPPORT)
+# endif ()
+# endif ()
#
# # Add the sub project
# add_subdirectory (Utilities/hdf5-1.8)
@@ -100,7 +100,7 @@ option (HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON)
mark_as_advanced (HDF5_USE_FOLDERS)
if (HDF5_USE_FOLDERS)
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
-endif (HDF5_USE_FOLDERS)
+endif ()
option (HDF5_NO_PACKAGES "CPACK - Disable packaging" OFF)
mark_as_advanced (HDF5_NO_PACKAGES)
option (ALLOW_UNSUPPORTED "Allow unsupported combinations of configure options" OFF)
@@ -185,41 +185,41 @@ set (HDF5_F90_SRC_DIR ${HDF5_SOURCE_DIR}/fortran)
if (APPLE)
option (HDF5_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE)
-endif (APPLE)
+endif ()
if (NOT HDF5_INSTALL_BIN_DIR)
set (HDF5_INSTALL_BIN_DIR bin)
-endif (NOT HDF5_INSTALL_BIN_DIR)
+endif ()
if (NOT HDF5_INSTALL_LIB_DIR)
if (APPLE)
set (HDF5_INSTALL_FMWK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
- endif (APPLE)
+ endif ()
set (HDF5_INSTALL_LIB_DIR lib)
-endif (NOT HDF5_INSTALL_LIB_DIR)
+endif ()
if (NOT HDF5_INSTALL_INCLUDE_DIR)
set (HDF5_INSTALL_INCLUDE_DIR include)
-endif (NOT HDF5_INSTALL_INCLUDE_DIR)
+endif ()
if (NOT HDF5_INSTALL_DATA_DIR)
if (NOT WIN32)
if (APPLE)
if (HDF5_BUILD_FRAMEWORKS)
set (HDF5_INSTALL_EXTRA_DIR ../SharedSupport)
- else (HDF5_BUILD_FRAMEWORKS)
+ else ()
set (HDF5_INSTALL_EXTRA_DIR share)
- endif (HDF5_BUILD_FRAMEWORKS)
+ endif ()
set (HDF5_INSTALL_FWRK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
- endif (APPLE)
+ endif ()
set (HDF5_INSTALL_DATA_DIR share)
set (HDF5_INSTALL_CMAKE_DIR share/cmake)
- else (NOT WIN32)
+ else ()
set (HDF5_INSTALL_DATA_DIR ".")
set (HDF5_INSTALL_CMAKE_DIR cmake)
- endif (NOT WIN32)
-endif (NOT HDF5_INSTALL_DATA_DIR)
+ endif ()
+endif ()
-if(DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}")
+if (DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}")
set (CMAKE_PREFIX_PATH ${ADDITIONAL_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH})
-endif(DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}")
+endif ()
#-----------------------------------------------------------------------------
# parse the full version number from H5public.h and include in H5_VERS_INFO
@@ -306,9 +306,9 @@ set (HDF5_PACKAGE_VERSION_MAJOR "${H5_VERS_MAJOR}.${H5_VERS_MINOR}")
set (HDF5_PACKAGE_VERSION_MINOR "${H5_VERS_RELEASE}")
if (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "")
set (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}-${H5_VERS_SUBRELEASE}")
-else (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "")
+else ()
set (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}")
-endif (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "")
+endif ()
set (HDF5_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}")
set (HDF5_TOOLS_PACKAGE_SOVERSION "${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}")
set (HDF5_CXX_PACKAGE_SOVERSION "${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}")
@@ -346,16 +346,19 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
)
if (WIN32)
set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE})
- else (WIN32)
+ set (CMAKE_PDB_OUTPUT_DIRECTORY
+ ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files."
+ )
+ else ()
set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
- endif (WIN32)
-else (NOT HDF5_EXTERNALLY_CONFIGURED)
+ endif ()
+else ()
# if we are externally configured, but the project uses old cmake scripts
# this may not be set and utilities like H5detect will fail
if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
- endif (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
-endif (NOT HDF5_EXTERNALLY_CONFIGURED)
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Targets built within this project are exported at Install time for use
@@ -363,7 +366,7 @@ endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
if (NOT HDF5_EXPORTED_TARGETS)
set (HDF5_EXPORTED_TARGETS "hdf5-targets")
-endif (NOT HDF5_EXPORTED_TARGETS)
+endif ()
#-----------------------------------------------------------------------------
# To include a library in the list exported by the project AT BUILD TIME,
@@ -389,17 +392,17 @@ set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
#-----------------------------------------------------------------------------
if (HDF5_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS)
set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries")
-endif (HDF5_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS)
+endif ()
#-----------------------------------------------------------------------------
-# Option to Build Shared and Static libs, default is static
+# Option to Build Shared and Static libs, default is both
#-----------------------------------------------------------------------------
option (BUILD_SHARED_LIBS "Build Shared Libraries" ON)
set (H5_ENABLE_SHARED_LIB NO)
if (BUILD_SHARED_LIBS)
set (H5_ENABLE_SHARED_LIB YES)
set (LINK_SHARED_LIBS ${LINK_LIBS})
-endif (BUILD_SHARED_LIBS)
+endif ()
set (H5_ENABLE_STATIC_LIB YES)
set (CMAKE_POSITION_INDEPENDENT_CODE ON)
@@ -411,8 +414,8 @@ if (BUILD_STATIC_EXECS)
if (NOT WIN32)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
- endif (NOT WIN32)
-endif (BUILD_STATIC_EXECS)
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Option to use code coverage
@@ -422,7 +425,7 @@ if (HDF5_ENABLE_COVERAGE)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
set (LDFLAGS "${LDFLAGS} -fprofile-arcs -ftest-coverage")
-endif (HDF5_ENABLE_COVERAGE)
+endif ()
#-----------------------------------------------------------------------------
# Option to indicate using dmalloc
@@ -431,7 +434,7 @@ endif (HDF5_ENABLE_COVERAGE)
# if (HDF5_ENABLE_USING_DMALLOC)
# find_package (DMALLOC)
# set (H5_HAVE_DMALLOC DMALLOC_FOUND)
-# endif (HDF5_ENABLE_USING_DMALLOC)
+# endif ()
#-----------------------------------------------------------------------------
# Option to indicate using a memory checker
@@ -439,7 +442,7 @@ endif (HDF5_ENABLE_COVERAGE)
option (HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF)
if (HDF5_ENABLE_USING_MEMCHECKER)
set (H5_USING_MEMCHECKER 1)
-endif (HDF5_ENABLE_USING_MEMCHECKER)
+endif ()
#-----------------------------------------------------------------------------
# Option to use deprecated public API symbols
@@ -447,9 +450,9 @@ endif (HDF5_ENABLE_USING_MEMCHECKER)
option (HDF5_ENABLE_DEPRECATED_SYMBOLS "Enable deprecated public API symbols" ON)
if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
set (H5_NO_DEPRECATED_SYMBOLS 0)
-else (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+else ()
set (H5_NO_DEPRECATED_SYMBOLS 1)
-endif (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+endif ()
#-----------------------------------------------------------------------------
# When building utility executables that generate other (source) files :
@@ -464,24 +467,24 @@ if (WIN32)
add_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1)
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
add_definitions (-D_CONSOLE)
- endif (NOT CYGWIN)
-endif (WIN32)
+ endif ()
+endif ()
if (MSVC)
set (CMAKE_MFC_FLAG 0)
set (WIN_COMPILE_FLAGS "")
set (WIN_LINK_FLAGS "")
-endif (MSVC)
+endif ()
set (MAKE_SYSTEM)
if (CMAKE_BUILD_TOOL MATCHES "make")
set (MAKE_SYSTEM 1)
-endif (CMAKE_BUILD_TOOL MATCHES "make")
+endif ()
set (CFG_INIT "/${CMAKE_CFG_INTDIR}")
if (MAKE_SYSTEM)
set (CFG_INIT "")
-endif (MAKE_SYSTEM)
+endif ()
#-----------------------------------------------------------------------------
# Add some definitions for Debug Builds
@@ -493,19 +496,19 @@ if (CMAKE_BUILD_TYPE MATCHES Debug)
# Enable tracing of the API
if (HDF5_ENABLE_TRACE)
add_definitions (-DH5_DEBUG_API )
- endif (HDF5_ENABLE_TRACE)
+ endif ()
# Enable instrumenting of the library's internal operations
option (HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF)
if (HDF5_ENABLE_INSTRUMENT)
set (H5_HAVE_INSTRUMENTED_LIBRARY 1)
- endif (HDF5_ENABLE_INSTRUMENT)
+ endif ()
mark_as_advanced (HDF5_ENABLE_INSTRUMENT)
-else (CMAKE_BUILD_TYPE MATCHES Debug)
+else ()
add_definitions (-DNDEBUG)
if (HDF5_ENABLE_TRACE)
add_definitions (-DH5_DEBUG_API )
- endif (HDF5_ENABLE_TRACE)
-endif (CMAKE_BUILD_TYPE MATCHES Debug)
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Option to embed library info into executables
@@ -513,7 +516,7 @@ endif (CMAKE_BUILD_TYPE MATCHES Debug)
option (HDF5_ENABLE_EMBEDDED_LIBINFO "embed library info into executables" ON)
if (HDF5_ENABLE_EMBEDDED_LIBINFO)
set (H5_HAVE_EMBEDDED_LIBINFO 1)
-endif (HDF5_ENABLE_EMBEDDED_LIBINFO)
+endif ()
include (${HDF_RESOURCES_DIR}/HDFCompilerFlags.cmake)
@@ -538,10 +541,10 @@ if (HDF5_ENABLE_PARALLEL)
# Used by Fortran + MPI
CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "${MPI_C_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm)
CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_C_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info)
- else (MPI_C_FOUND)
+ else ()
message (STATUS "Parallel libraries not found")
- endif (MPI_C_FOUND)
-endif (HDF5_ENABLE_PARALLEL)
+ endif ()
+endif ()
# Parallel IO usage requires MPI to be Linked and Included
if (H5_HAVE_PARALLEL)
@@ -549,8 +552,8 @@ if (H5_HAVE_PARALLEL)
set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${MPI_C_LIBRARIES})
if (MPI_C_LINK_FLAGS)
set (CMAKE_EXE_LINKER_FLAGS "${MPI_C_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
- endif (MPI_C_LINK_FLAGS)
-endif (H5_HAVE_PARALLEL)
+ endif ()
+endif ()
set (DEFAULT_API_VERSION "v18")
#-----------------------------------------------------------------------------
@@ -561,7 +564,7 @@ set (H5_USE_16_API_DEFAULT 0)
if (HDF5_USE_16_API_DEFAULT)
set (H5_USE_16_API_DEFAULT 1)
set (DEFAULT_API_VERSION "v16")
-endif (HDF5_USE_16_API_DEFAULT)
+endif ()
#-----------------------------------------------------------------------------
# Include user macros
@@ -582,13 +585,13 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
if (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
PACKAGE_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
- endif (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
+ endif ()
if (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
PACKAGE_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
- endif (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
- endif (HDF5_PACKAGE_EXTLIBS)
-endif (NOT HDF5_EXTERNALLY_CONFIGURED)
+ endif ()
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Option to use threadsafe
#-----------------------------------------------------------------------------
@@ -600,65 +603,65 @@ if (HDF5_ENABLE_THREADSAFE)
if (HDF5_ENABLE_PARALLEL)
if (NOT ALLOW_UNSUPPORTED)
message (FATAL_ERROR " **** parallel and thread-safety options are not supported **** ")
- else (NOT ALLOW_UNSUPPORTED)
+ else ()
message (STATUS " **** Allowing unsupported parallel and thread-safety options **** ")
- endif (NOT ALLOW_UNSUPPORTED)
- endif (HDF5_ENABLE_PARALLEL)
+ endif ()
+ endif ()
if (HDF5_BUILD_FORTRAN)
if (NOT ALLOW_UNSUPPORTED)
message (FATAL_ERROR " **** Fortran and thread-safety options are not supported **** ")
- else (NOT ALLOW_UNSUPPORTED)
+ else ()
message (STATUS " **** Allowing unsupported Fortran and thread-safety options **** ")
- endif (NOT ALLOW_UNSUPPORTED)
- endif (HDF5_BUILD_FORTRAN)
+ endif ()
+ endif ()
if (HDF5_BUILD_CPP_LIB)
if (NOT ALLOW_UNSUPPORTED)
message (FATAL_ERROR " **** C++ and thread-safety options are not supported **** ")
- else (NOT ALLOW_UNSUPPORTED)
+ else ()
message (STATUS " **** Allowing unsupported C++ and thread-safety options **** ")
- endif (NOT ALLOW_UNSUPPORTED)
- endif (HDF5_BUILD_CPP_LIB)
+ endif ()
+ endif ()
if (HDF5_BUILD_HL_LIB)
if (NOT ALLOW_UNSUPPORTED)
message (FATAL_ERROR " **** HL and thread-safety options are not supported **** ")
- else (NOT ALLOW_UNSUPPORTED)
+ else ()
message (STATUS " **** Allowing unsupported HL and thread-safety options **** ")
- endif (NOT ALLOW_UNSUPPORTED)
- endif (HDF5_BUILD_HL_LIB)
+ endif ()
+ endif ()
if (H5_HAVE_IOEO)
message (STATUS " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ")
set (H5_HAVE_WIN_THREADS 1)
- else (H5_HAVE_IOEO)
+ else ()
if (NOT H5_HAVE_PTHREAD_H)
message (FATAL_ERROR " **** thread-safe option requires Win32 threads or Pthreads **** ")
- endif (NOT H5_HAVE_PTHREAD_H)
- endif (H5_HAVE_IOEO)
+ endif ()
+ endif ()
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads)
if (NOT Threads_FOUND)
message (STATUS " **** thread-safe package not found - threads still might work **** ")
- endif (NOT Threads_FOUND)
-endif (HDF5_ENABLE_THREADSAFE)
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Add the HDF5 Library Target to the build
#-----------------------------------------------------------------------------
add_subdirectory (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src)
-if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
ADD_DEPENDENCIES (${HDF5_LIB_TARGET} ZLIB)
if (BUILD_SHARED_LIBS)
add_dependencies (${HDF5_LIBSH_TARGET} ZLIB)
- endif (BUILD_SHARED_LIBS)
- endif (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
+ endif ()
+ endif ()
if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
ADD_DEPENDENCIES (${HDF5_LIB_TARGET} SZIP)
if (BUILD_SHARED_LIBS)
add_dependencies (${HDF5_LIBSH_TARGET} SZIP)
- endif (BUILD_SHARED_LIBS)
- endif (SZIP_FOUND AND SZIP_USE_EXTERNAL)
-endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ endif ()
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Dashboard and Testing Settings
@@ -675,7 +678,7 @@ if (BUILD_TESTING)
if (HDF5_TEST_VFD)
option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON)
mark_as_advanced (HDF5_TEST_FHEAP_VFD)
- endif (HDF5_TEST_VFD)
+ endif ()
option (HDF_TEST_EXPRESS "Control testing framework (0-3)" "0")
mark_as_advanced (HDF_TEST_EXPRESS)
@@ -690,14 +693,14 @@ if (BUILD_TESTING)
if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test")
add_subdirectory (${HDF5_SOURCE_DIR}/tools/lib ${PROJECT_BINARY_DIR}/tools/lib)
add_subdirectory (${HDF5_SOURCE_DIR}/test ${PROJECT_BINARY_DIR}/test)
- endif (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test")
+ endif ()
if (H5_HAVE_PARALLEL)
if (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar")
add_subdirectory (${HDF5_SOURCE_DIR}/testpar ${PROJECT_BINARY_DIR}/testpar)
- endif (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar")
- endif (H5_HAVE_PARALLEL)
- endif (NOT HDF5_EXTERNALLY_CONFIGURED)
-endif (BUILD_TESTING)
+ endif ()
+ endif ()
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Option to build HDF5 Tools
@@ -706,8 +709,8 @@ 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")
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Option to build examples
@@ -716,8 +719,8 @@ if (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/ex
option (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" ON)
if (HDF5_BUILD_EXAMPLES)
add_subdirectory (${HDF5_SOURCE_DIR}/examples ${PROJECT_BINARY_DIR}/examples)
- endif (HDF5_BUILD_EXAMPLES)
-endif (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples")
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Option to build High Level API's
@@ -727,8 +730,8 @@ if (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
if (HDF5_BUILD_HL_LIB)
set (H5_INCLUDE_HL 1)
add_subdirectory (${HDF5_SOURCE_DIR}/hl ${PROJECT_BINARY_DIR}/hl)
- endif (HDF5_BUILD_HL_LIB)
-endif (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Option to build Fortran bindings/tests/examples
@@ -746,27 +749,28 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
if (NOT ALLOW_UNSUPPORTED)
message (STATUS " **** Shared FORTRAN libraries are unsupported **** ")
set (SKIP_HDF5_FORTRAN_SHARED ON)
- else (NOT ALLOW_UNSUPPORTED)
+ else ()
message (STATUS " **** Allowing unsupported Fortran shared libraries **** ")
- endif (NOT ALLOW_UNSUPPORTED)
- endif (BUILD_SHARED_LIBS AND APPLE)
+ endif ()
+ endif ()
option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON)
+
include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake)
if (HDF5_ENABLE_F2003)
if (NOT FORTRAN_HAVE_ISO_C_BINDING)
set (HDF5_ENABLE_F2003 OFF)
- endif (NOT FORTRAN_HAVE_ISO_C_BINDING)
- endif (HDF5_ENABLE_F2003)
+ endif ()
+ endif ()
add_subdirectory (${HDF5_SOURCE_DIR}/fortran ${PROJECT_BINARY_DIR}/fortran)
if (HDF5_BUILD_HL_LIB)
if (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran")
#-- Build the High Level Fortran source codes
add_subdirectory (${HDF5_SOURCE_DIR}/hl/fortran ${PROJECT_BINARY_DIR}/hl/fortran)
- endif (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran")
- endif (HDF5_BUILD_HL_LIB)
- endif (HDF5_BUILD_FORTRAN)
-endif (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
+ endif ()
+ endif ()
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Option to build HDF5 C++ Library
@@ -778,22 +782,22 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
if (HDF5_ENABLE_PARALLEL)
if (NOT ALLOW_UNSUPPORTED)
message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive **** ")
- else (NOT ALLOW_UNSUPPORTED)
+ else ()
message (STATUS " **** Allowing unsupported Parallel and C++ options **** ")
- endif (NOT ALLOW_UNSUPPORTED)
- endif (HDF5_ENABLE_PARALLEL)
+ endif ()
+ endif ()
if (CMAKE_NO_STD_NAMESPACE)
set (H5_NO_STD 1)
- endif (CMAKE_NO_STD_NAMESPACE)
+ endif ()
add_subdirectory (${HDF5_SOURCE_DIR}/c++ ${PROJECT_BINARY_DIR}/c++)
if (HDF5_BUILD_HL_LIB)
if (EXISTS "${HDF5_SOURCE_DIR}/hl/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/c++")
#-- Build the High Level Fortran source codes
add_subdirectory (${HDF5_SOURCE_DIR}/hl/c++ ${PROJECT_BINARY_DIR}/hl/c++)
- endif (EXISTS "${HDF5_SOURCE_DIR}/hl/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/c++")
- endif (HDF5_BUILD_HL_LIB)
- endif (HDF5_BUILD_CPP_LIB)
-endif (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
+ endif ()
+ endif ()
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Check if Fortran's default real is double precision. If it is and HL is
@@ -802,8 +806,8 @@ endif (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++"
if (HDF5_BUILD_FORTRAN AND HDF5_BUILD_HL_LIB )
if (NOT FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
message (FATAL_ERROR " **** Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use HDF5_BUILD_HL_LIB:BOOL=OFF **** ")
- endif (NOT FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
- endif (HDF5_BUILD_FORTRAN AND HDF5_BUILD_HL_LIB )
+ endif ()
+ endif ()
#-----------------------------------------------------------------------------
# Generate the H5pubconf.h file containing user settings needed by compilation