summaryrefslogtreecommitdiffstats
path: root/src
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 /src
parenta4cd30d418838bee49ca112fdfbcc199889b4a21 (diff)
downloadhdf5-e1bcae8a6a804490aa941a654e99b1dd18251411.zip
hdf5-e1bcae8a6a804490aa941a654e99b1dd18251411.tar.gz
hdf5-e1bcae8a6a804490aa941a654e99b1dd18251411.tar.bz2
Update cmake min version and cmake command convention
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 55de5ea..510db1e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
PROJECT (HDF5_SRC C CXX)
#-----------------------------------------------------------------------------
@@ -658,7 +658,7 @@ set (H5Z_SOURCES
if (H5_ZLIB_HEADER)
SET_PROPERTY(SOURCE ${HDF5_SRC_DIR}/H5Zdeflate.c PROPERTY
COMPILE_DEFINITIONS H5_ZLIB_HEADER="${H5_ZLIB_HEADER}")
-endif (H5_ZLIB_HEADER)
+endif ()
set (H5Z_HDRS
@@ -816,10 +816,10 @@ if (HDF5_GENERATE_HEADERS)
COMMAND ${PERL_EXECUTABLE} ${HDF5_SOURCE_DIR}/bin/make_overflow ${HDF5_SRC_DIR}/H5overflow.txt OUTPUT_VARIABLE SCRIPT_OUTPUT
)
message(STATUS ${SCRIPT_OUTPUT})
- else (PERL_FOUND)
+ else ()
message (STATUS "Cannot generate headers - perl not found")
- endif (PERL_FOUND)
-endif (HDF5_GENERATE_HEADERS)
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Setup the H5Detect utility which generates H5Tinit with platform
@@ -829,7 +829,7 @@ add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c)
TARGET_C_PROPERTIES (H5detect STATIC " " " ")
if (MSVC OR MINGW)
target_link_libraries (H5detect "ws2_32.lib")
-endif (MSVC OR MINGW)
+endif ()
set (CMD $<TARGET_FILE:H5detect>)
add_custom_command (
@@ -843,7 +843,7 @@ add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
TARGET_C_PROPERTIES (H5make_libsettings STATIC " " " ")
if (MSVC OR MINGW)
target_link_libraries (H5make_libsettings "ws2_32.lib")
-endif (MSVC OR MINGW)
+endif ()
set (CMD $<TARGET_FILE:H5make_libsettings>)
add_custom_command (
@@ -864,10 +864,10 @@ TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS})
if (NOT WIN32)
target_link_libraries (${HDF5_LIB_TARGET} dl)
-endif (NOT WIN32)
+endif ()
if (H5_HAVE_PARALLEL AND MPI_C_FOUND)
target_link_libraries (${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES})
-endif (H5_HAVE_PARALLEL AND MPI_C_FOUND)
+endif ()
set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC)
set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
@@ -881,7 +881,7 @@ if (HDF5_ENABLE_DEBUG_APIS)
COMPILE_DEFINITIONS
"H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG"
)
-endif (HDF5_ENABLE_DEBUG_APIS)
+endif ()
set (install_targets ${HDF5_LIB_TARGET})
if (BUILD_SHARED_LIBS)
@@ -908,10 +908,10 @@ if (BUILD_SHARED_LIBS)
target_link_libraries (${HDF5_LIBSH_TARGET} ${LINK_SHARED_LIBS})
if (NOT WIN32)
target_link_libraries (${HDF5_LIBSH_TARGET} dl)
- endif (NOT WIN32)
+ endif ()
if (H5_HAVE_PARALLEL AND MPI_C_FOUND)
target_link_libraries (${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES})
- endif (H5_HAVE_PARALLEL AND MPI_C_FOUND)
+ endif ()
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION})
set_target_properties (${HDF5_LIBSH_TARGET} PROPERTIES
@@ -926,16 +926,16 @@ if (BUILD_SHARED_LIBS)
"H5_HAVE_THREADSAFE"
)
target_link_libraries (${HDF5_LIBSH_TARGET} Threads::Threads)
- endif (HDF5_ENABLE_THREADSAFE)
+ endif ()
if (HDF5_ENABLE_DEBUG_APIS)
set_property (TARGET ${HDF5_LIBSH_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
"H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG"
)
- endif (HDF5_ENABLE_DEBUG_APIS)
+ endif ()
set (install_targets ${install_targets} ${HDF5_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif ()
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
@@ -950,7 +950,7 @@ if (NOT HDF5_INSTALL_NO_DEVELOPMENT)
COMPONENT
headers
)
-endif (NOT HDF5_INSTALL_NO_DEVELOPMENT)
+endif ()
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
@@ -958,7 +958,7 @@ endif (NOT HDF5_INSTALL_NO_DEVELOPMENT)
if (HDF5_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries)
- endif (BUILD_SHARED_LIBS)
+ endif ()
install (
TARGETS
@@ -971,4 +971,4 @@ if (HDF5_EXPORTED_TARGETS)
FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT libraries
INCLUDES DESTINATION include
)
-endif (HDF5_EXPORTED_TARGETS)
+endif ()