summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-01-10 23:09:53 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-01-10 23:10:03 (GMT)
commite1bcae8a6a804490aa941a654e99b1dd18251411 (patch)
treeef2ea266500b5bfea473b15495d850c5640ab1ed /CMakeLists.txt
parenta4cd30d418838bee49ca112fdfbcc199889b4a21 (diff)
downloadhdf5-e1bcae8a6a804490aa941a654e99b1dd18251411.zip
hdf5-e1bcae8a6a804490aa941a654e99b1dd18251411.tar.gz
hdf5-e1bcae8a6a804490aa941a654e99b1dd18251411.tar.bz2
Update cmake min version and cmake command convention
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt300
1 files changed, 150 insertions, 150 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b59943e..17f578e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
PROJECT (HDF5 C CXX)
#-----------------------------------------------------------------------------
@@ -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)
@@ -201,48 +201,48 @@ set (HDF5_JAVA_LOGGING_SIMPLE_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-simple-
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)
if (HDF5_BUILD_FRAMEWORKS)
set (HDF5_INSTALL_JAR_DIR ../Java)
- else (HDF5_BUILD_FRAMEWORKS)
+ else ()
set (HDF5_INSTALL_JAR_DIR lib)
- endif (HDF5_BUILD_FRAMEWORKS)
+ endif ()
set (HDF5_INSTALL_FMWK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
- else (APPLE)
+ else ()
set (HDF5_INSTALL_JAR_DIR lib)
- 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
@@ -271,7 +271,7 @@ string (REGEX REPLACE ".*LT_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
MATH (EXPR H5_SOVERS_MAJOR ${H5_SOVERS_INTERFACE}-${H5_SOVERS_RELEASE})
message (STATUS "SOVERSION: ${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}")
string (REGEX MATCH ".*LT_TOOLS_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_TOOLS_SOVERS_EXISTS ${_lt_vers_am_contents})
-if(H5_TOOLS_SOVERS_EXISTS)
+if (H5_TOOLS_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_TOOLS_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_TOOLS_SOVERS_INTERFACE ${_lt_vers_am_contents})
string (REGEX REPLACE ".*LT_TOOLS_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$"
@@ -280,9 +280,9 @@ if(H5_TOOLS_SOVERS_EXISTS)
"\\1" H5_TOOLS_SOVERS_RELEASE ${_lt_vers_am_contents})
MATH (EXPR H5_TOOLS_SOVERS_MAJOR ${H5_TOOLS_SOVERS_INTERFACE}-${H5_TOOLS_SOVERS_RELEASE})
message (STATUS "SOVERSION_TOOLS: ${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}")
-endif()
+endif ()
string (REGEX REPLACE ".*LT_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_CXX_SOVERS_EXISTS ${_lt_vers_am_contents})
-if(H5_CXX_SOVERS_EXISTS)
+if (H5_CXX_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_CXX_SOVERS_INTERFACE ${_lt_vers_am_contents})
string (REGEX REPLACE ".*LT_CXX_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$"
@@ -291,9 +291,9 @@ if(H5_CXX_SOVERS_EXISTS)
"\\1" H5_CXX_SOVERS_RELEASE ${_lt_vers_am_contents})
MATH (EXPR H5_CXX_SOVERS_MAJOR ${H5_CXX_SOVERS_INTERFACE}-${H5_CXX_SOVERS_RELEASE})
message (STATUS "SOVERSION_CXX: ${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}")
-endif()
+endif ()
string (REGEX REPLACE ".*LT_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_F_SOVERS_EXISTS ${_lt_vers_am_contents})
-if(H5_F_SOVERS_EXISTS)
+if (H5_F_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_F_SOVERS_INTERFACE ${_lt_vers_am_contents})
string (REGEX REPLACE ".*LT_F_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$"
@@ -302,9 +302,9 @@ if(H5_F_SOVERS_EXISTS)
"\\1" H5_F_SOVERS_RELEASE ${_lt_vers_am_contents})
MATH (EXPR H5_F_SOVERS_MAJOR ${H5_F_SOVERS_INTERFACE}-${H5_F_SOVERS_RELEASE})
message (STATUS "SOVERSION_F: ${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}")
-endif()
+endif ()
string (REGEX REPLACE ".*LT_HL_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_SOVERS_EXISTS ${_lt_vers_am_contents})
-if(H5_HL_SOVERS_EXISTS)
+if (H5_HL_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_HL_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_HL_SOVERS_INTERFACE ${_lt_vers_am_contents})
string (REGEX REPLACE ".*LT_HL_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$"
@@ -313,9 +313,9 @@ if(H5_HL_SOVERS_EXISTS)
"\\1" H5_HL_SOVERS_RELEASE ${_lt_vers_am_contents})
MATH (EXPR H5_HL_SOVERS_MAJOR ${H5_HL_SOVERS_INTERFACE}-${H5_HL_SOVERS_RELEASE})
message (STATUS "SOVERSION_HL: ${H5_HL_SOVERS_MAJOR}.${H5_HL_SOVERS_RELEASE}.${H5_HL_SOVERS_MINOR}")
-endif()
+endif ()
string (REGEX REPLACE ".*LT_HL_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_CXX_SOVERS_EXISTS ${_lt_vers_am_contents})
-if(H5_HL_CXX_SOVERS_EXISTS)
+if (H5_HL_CXX_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_HL_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_HL_CXX_SOVERS_INTERFACE ${_lt_vers_am_contents})
string (REGEX REPLACE ".*LT_HL_CXX_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$"
@@ -324,9 +324,9 @@ if(H5_HL_CXX_SOVERS_EXISTS)
"\\1" H5_HL_CXX_SOVERS_RELEASE ${_lt_vers_am_contents})
MATH (EXPR H5_HL_CXX_SOVERS_MAJOR ${H5_HL_CXX_SOVERS_INTERFACE}-${H5_HL_CXX_SOVERS_RELEASE})
message (STATUS "SOVERSION_HL_CXX: ${H5_HL_CXX_SOVERS_MAJOR}.${H5_HL_CXX_SOVERS_RELEASE}.${H5_HL_CXX_SOVERS_MINOR}")
-endif()
+endif ()
string (REGEX REPLACE ".*LT_HL_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_F_SOVERS_EXISTS ${_lt_vers_am_contents})
-if(H5_HL_F_SOVERS_EXISTS)
+if (H5_HL_F_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_HL_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_HL_F_SOVERS_INTERFACE ${_lt_vers_am_contents})
string (REGEX REPLACE ".*LT_HL_F_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$"
@@ -335,7 +335,7 @@ if(H5_HL_F_SOVERS_EXISTS)
"\\1" H5_HL_F_SOVERS_RELEASE ${_lt_vers_am_contents})
MATH (EXPR H5_HL_F_SOVERS_MAJOR ${H5_HL_F_SOVERS_INTERFACE}-${H5_HL_F_SOVERS_RELEASE})
message (STATUS "SOVERSION_HL_F: ${H5_HL_F_SOVERS_MAJOR}.${H5_HL_F_SOVERS_RELEASE}.${H5_HL_F_SOVERS_MINOR}")
-endif()
+endif ()
string (REGEX REPLACE ".*LT_JAVA_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_JAVA_SOVERS_EXISTS ${_lt_vers_am_contents})
if(H5_JAVA_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_JAVA_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$"
@@ -346,7 +346,7 @@ if(H5_JAVA_SOVERS_EXISTS)
"\\1" H5_JAVA_SOVERS_RELEASE ${_lt_vers_am_contents})
MATH (EXPR H5_JAVA_SOVERS_MAJOR ${H5_JAVA_SOVERS_INTERFACE}-${H5_JAVA_SOVERS_RELEASE})
message (STATUS "SOVERSION_JAVA: ${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}")
-endif()
+endif ()
#-----------------------------------------------------------------------------
# Basic HDF5 stuff here
@@ -358,45 +358,45 @@ 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}")
-if(H5_TOOLS_SOVERS_EXISTS)
+if (H5_TOOLS_SOVERS_EXISTS)
set (HDF5_TOOLS_PACKAGE_SOVERSION "${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}")
-else()
+else ()
set (HDF5_TOOLS_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}")
-endif()
-if(H5_CXX_SOVERS_EXISTS)
+endif ()
+if (H5_CXX_SOVERS_EXISTS)
set (HDF5_CXX_PACKAGE_SOVERSION "${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}")
-else()
+else ()
set (HDF5_CXX_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}")
-endif()
-if(H5_F_SOVERS_EXISTS)
+endif ()
+if (H5_F_SOVERS_EXISTS)
set (HDF5_F_PACKAGE_SOVERSION "${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}")
-else()
+else ()
set (HDF5_F_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}")
-endif()
-if(H5_HL_SOVERS_EXISTS)
+endif ()
+if (H5_HL_SOVERS_EXISTS)
set (HDF5_HL_PACKAGE_SOVERSION "${H5_HL_SOVERS_MAJOR}.${H5_HL_SOVERS_RELEASE}.${H5_HL_SOVERS_MINOR}")
-else()
+else ()
set (HDF5_HL_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}")
-endif()
-if(H5_HL_F_SOVERS_EXISTS)
+endif ()
+if (H5_HL_F_SOVERS_EXISTS)
set (HDF5_HL_CXX_PACKAGE_SOVERSION "${H5_HL_CXX_SOVERS_MAJOR}.${H5_HL_CXX_SOVERS_RELEASE}.${H5_HL_CXX_SOVERS_MINOR}")
-else()
+else ()
set (HDF5_HL_CXX_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}")
-endif()
-if(H5_HL_F_SOVERS_EXISTS)
+endif ()
+if (H5_HL_F_SOVERS_EXISTS)
set (HDF5_HL_F_PACKAGE_SOVERSION "${H5_HL_F_SOVERS_MAJOR}.${H5_HL_F_SOVERS_RELEASE}.${H5_HL_F_SOVERS_MINOR}")
-else()
+else ()
set (HDF5_HL_F_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}")
-endif()
-if(H5_JAVA_SOVERS_EXISTS)
+endif ()
+if (H5_JAVA_SOVERS_EXISTS)
set (HDF5_PACKAGE_SOVERSION "${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}")
-else()
+else ()
set (HDF5_JAVA_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}")
-endif()
+endif ()
set (HDF5_PACKAGE_STRING "${HDF5_PACKAGE_NAME} ${HDF5_PACKAGE_VERSION_STRING}")
set (HDF5_PACKAGE_TARNAME "${HDF5_PACKAGE}${HDF_PACKAGE_EXT}")
set (HDF5_PACKAGE_URL "http://www.hdfgroup.org")
@@ -427,16 +427,16 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
)
if (WIN32)
set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE})
- else (WIN32)
+ 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
@@ -444,7 +444,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,
@@ -470,7 +470,7 @@ 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
@@ -480,7 +480,7 @@ 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)
@@ -492,8 +492,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
@@ -503,7 +503,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
@@ -512,7 +512,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
@@ -520,7 +520,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 indicate internal memory allocation sanity checks are enabled
@@ -528,7 +528,7 @@ endif (HDF5_ENABLE_USING_MEMCHECKER)
option (HDF5_MEMORY_ALLOC_SANITY_CHECK "Indicate that internal memory allocation sanity checks are enabled" OFF)
if (HDF5_MEMORY_ALLOC_SANITY_CHECK)
set (H5_MEMORY_ALLOC_SANITY_CHECK 1)
-endif (HDF5_MEMORY_ALLOC_SANITY_CHECK)
+endif ()
#-----------------------------------------------------------------------------
# Option to use deprecated public API symbols
@@ -536,9 +536,9 @@ endif (HDF5_MEMORY_ALLOC_SANITY_CHECK)
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 :
@@ -553,24 +553,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
@@ -582,19 +582,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
@@ -602,7 +602,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)
@@ -627,10 +627,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)
@@ -638,8 +638,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 "v110")
#-----------------------------------------------------------------------------
@@ -650,7 +650,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 ()
#-----------------------------------------------------------------------------
# Option to use 1.8.x API
@@ -660,7 +660,7 @@ set (H5_USE_18_API_DEFAULT 0)
if (HDF5_USE_18_API_DEFAULT)
set (H5_USE_18_API_DEFAULT 1)
set (DEFAULT_API_VERSION "v18")
-endif (HDF5_USE_18_API_DEFAULT)
+endif ()
#-----------------------------------------------------------------------------
# Include user macros
@@ -681,13 +681,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
#-----------------------------------------------------------------------------
@@ -699,45 +699,45 @@ 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 ()
# -----------------------------------------------------------------------
# wrapper script variables
@@ -755,15 +755,15 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT
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 "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ endif ()
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Dashboard and Testing Settings
@@ -780,7 +780,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)
@@ -795,14 +795,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
@@ -811,8 +811,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
@@ -821,8 +821,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
@@ -832,8 +832,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
@@ -851,10 +851,10 @@ 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)
@@ -871,8 +871,8 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
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 ()
# -----------------------------------------------------------------------
# wrapper script variables
@@ -884,10 +884,10 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
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
@@ -899,22 +899,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
@@ -923,8 +923,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 ()
#-----------------------------------------------------------------------------
# Option to build HDF5 Java Library
@@ -933,8 +933,8 @@ if (EXISTS "${HDF5_SOURCE_DIR}/java" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/java")
option (HDF5_BUILD_JAVA "Build Java HDF5 Library" OFF)
if (HDF5_BUILD_JAVA)
add_subdirectory (${HDF5_SOURCE_DIR}/java ${PROJECT_BINARY_DIR}/java)
- endif (HDF5_BUILD_JAVA)
-endif (EXISTS "${HDF5_SOURCE_DIR}/java" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/java")
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Generate the H5pubconf.h file containing user settings needed by compilation