summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt10
-rw-r--r--c++/examples/CMakeLists.txt11
-rw-r--r--c++/test/CMakeLists.txt11
-rw-r--r--config/cmake/ConfigureChecks.cmake65
-rw-r--r--config/cmake/HDF5Macros.cmake36
-rw-r--r--config/cmake/HDF5Tests.c11
-rw-r--r--examples/CMakeLists.txt22
-rw-r--r--fortran/examples/CMakeLists.txt38
-rw-r--r--fortran/test/CMakeLists.txt52
-rw-r--r--fortran/testpar/CMakeLists.txt13
-rw-r--r--hl/c++/examples/CMakeLists.txt22
-rw-r--r--hl/c++/test/CMakeLists.txt11
-rw-r--r--hl/examples/CMakeLists.txt11
-rw-r--r--hl/fortran/examples/CMakeLists.txt17
-rw-r--r--hl/fortran/test/CMakeLists.txt51
-rw-r--r--hl/test/CMakeLists.txt22
-rw-r--r--hl/tools/CMakeLists.txt31
-rw-r--r--perform/CMakeLists.txt99
-rw-r--r--test/CMakeLists.txt77
-rw-r--r--testpar/CMakeLists.txt22
-rw-r--r--tools/h5copy/CMakeLists.txt20
-rw-r--r--tools/h5diff/CMakeLists.txt20
-rw-r--r--tools/h5dump/CMakeLists.txt20
-rw-r--r--tools/h5import/CMakeLists.txt22
-rw-r--r--tools/h5jam/CMakeLists.txt53
-rw-r--r--tools/h5ls/CMakeLists.txt11
-rw-r--r--tools/h5repack/CMakeLists.txt33
-rw-r--r--tools/h5stat/CMakeLists.txt20
-rw-r--r--tools/misc/CMakeLists.txt53
29 files changed, 172 insertions, 712 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8401c6e..0f46fa6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -304,17 +304,25 @@ ENDIF (MAKE_SYSTEM)
IF (CMAKE_BUILD_TYPE MATCHES Debug)
ADD_DEFINITIONS (-DDEBUG)
ADD_DEFINITIONS (
- -DH5_DEBUG_API -DH5Z_DEBUG -DH5V_DEBUG -DH5T_DEBUG
+ -DH5Z_DEBUG -DH5V_DEBUG -DH5T_DEBUG
-DH5S_DEBUG -DH5P_DEBUG -DH5O_DEBUG -DH5MM_DEBUG -DH5MF_DEBUG
-DH5I_DEBUG -DH5HL_DEBUG -DH5HG_DEBUG -DH5G_DEBUG -DH5F_DEBUG
-DH5E_DEBUG -DH5D_DEBUG -DH5B_DEBUG -DH5AC_DEBUG -UNDEBUG
)
+ OPTION (HDF5_ENABLE_TRACE "Enable API tracing capability" ON)
+ IF (HDF5_ENABLE_TRACE)
+ ADD_DEFINITIONS (-DH5_DEBUG_API )
+ ENDIF (HDF5_ENABLE_TRACE)
#-- NMake Makefiles will overwhelm the console with warnings if -Wall is used.
IF (NOT WIN32)
ADD_DEFINITIONS (-Wall)
ENDIF (NOT WIN32)
ELSE (CMAKE_BUILD_TYPE MATCHES Debug)
ADD_DEFINITIONS (-UH5_DEBUG_API -DNDEBUG)
+ OPTION (HDF5_ENABLE_TRACE "Enable API tracing capability" OFF)
+ IF (HDF5_ENABLE_TRACE)
+ ADD_DEFINITIONS (-DH5_DEBUG_API )
+ ENDIF (HDF5_ENABLE_TRACE)
ENDIF (CMAKE_BUILD_TYPE MATCHES Debug)
#-----------------------------------------------------------------------------
diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt
index c5024f5..a650db5 100644
--- a/c++/examples/CMakeLists.txt
+++ b/c++/examples/CMakeLists.txt
@@ -23,16 +23,7 @@ SET (examples
FOREACH (example ${examples})
ADD_EXECUTABLE (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
H5_NAMING (cpp_ex_${example})
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (cpp_ex_${example}
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (cpp_ex_${example})
TARGET_LINK_LIBRARIES (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_TEST (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index 722bd37..e29963e 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -37,16 +37,7 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR} )
ADD_EXECUTABLE (cpp_testhdf5 ${CPP_TEST_SRCS} )
H5_NAMING (cpp_testhdf5)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (cpp_testhdf5
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (cpp_testhdf5)
TARGET_LINK_LIBRARIES (cpp_testhdf5
${HDF5_CPP_LIB_TARGET}
${HDF5_LIB_TARGET}
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 1318e90..b5b1170 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -35,6 +35,7 @@ OPTION (HDF5_Enable_Clear_File_Buffers "Securely clear file buffers before writi
IF (HDF5_Enable_Clear_File_Buffers)
SET (H5_CLEAR_MEMORY 1)
ENDIF (HDF5_Enable_Clear_File_Buffers)
+MARK_AS_ADVANCED (HDF5_Enable_Clear_File_Buffers)
#-----------------------------------------------------------------------------
# Option for --enable-instrument
@@ -46,6 +47,7 @@ OPTION (HDF5_Enable_Instrument "Instrument The library" HDF5_Enable_Instrument)
IF (HDF5_Enable_Instrument)
SET (H5_HAVE_INSTRUMENTED_LIBRARY 1)
ENDIF (HDF5_Enable_Instrument)
+MARK_AS_ADVANCED (HDF5_Enable_Instrument)
#-----------------------------------------------------------------------------
# Option for --enable-strict-format-checks
@@ -54,6 +56,7 @@ OPTION (HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks"
IF (HDF5_STRICT_FORMAT_CHECKS)
SET (H5_STRICT_FORMAT_CHECKS 1)
ENDIF (HDF5_STRICT_FORMAT_CHECKS)
+MARK_AS_ADVANCED (HDF5_STRICT_FORMAT_CHECKS)
#-----------------------------------------------------------------------------
# Option for --enable-metadata-trace-file
@@ -62,6 +65,7 @@ OPTION (HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" OFF)
IF (HDF5_METADATA_TRACE_FILE)
SET (H5_METADATA_TRACE_FILE 1)
ENDIF (HDF5_METADATA_TRACE_FILE)
+MARK_AS_ADVANCED (HDF5_METADATA_TRACE_FILE)
# ----------------------------------------------------------------------
# Decide whether the data accuracy has higher priority during data
@@ -73,6 +77,7 @@ OPTION (HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conv
IF (HDF5_WANT_DATA_ACCURACY)
SET (H5_WANT_DATA_ACCURACY 1)
ENDIF(HDF5_WANT_DATA_ACCURACY)
+MARK_AS_ADVANCED (HDF5_WANT_DATA_ACCURACY)
# ----------------------------------------------------------------------
# Decide whether the presence of user's exception handling functions is
@@ -84,24 +89,16 @@ OPTION (HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked durin
IF (HDF5_WANT_DCONV_EXCEPTION)
SET (H5_WANT_DCONV_EXCEPTION 1)
ENDIF (HDF5_WANT_DCONV_EXCEPTION)
+MARK_AS_ADVANCED (HDF5_WANT_DCONV_EXCEPTION)
-SET (LINUX_LFS 0)
-SET (HDF5_EXTRA_FLAGS)
-IF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.")
- # Linux Specific flags
- ADD_DEFINITIONS (-D_POSIX_SOURCE -D_BSD_SOURCE)
- OPTION (HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON)
- IF (HDF5_ENABLE_LARGE_FILE)
- SET (LARGEFILE 1)
- SET (HDF5_EXTRA_FLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
- SET (CMAKE_REQUIRED_DEFINITIONS ${HDF5_EXTRA_FLAGS})
- ENDIF (HDF5_ENABLE_LARGE_FILE)
-ENDIF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.")
-IF (LINUX_LFS)
- SET (HDF5_EXTRA_FLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
- SET (CMAKE_REQUIRED_DEFINITIONS ${HDF5_EXTRA_FLAGS})
-ENDIF (LINUX_LFS)
-ADD_DEFINITIONS (${HDF5_EXTRA_FLAGS})
+# ----------------------------------------------------------------------
+# Check if they would like the function stack support compiled in
+#
+OPTION (HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF)
+IF (HDF5_ENABLE_CODESTACK)
+ SET (H5_HAVE_CODESTACK 1)
+ENDIF (HDF5_ENABLE_CODESTACK)
+MARK_AS_ADVANCED (HDF5_ENABLE_CODESTACK)
#IF (WIN32)
# SET (DEFAULT_STREAM_VFD OFF)
@@ -253,6 +250,28 @@ IF (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
ENDIF (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
#-----------------------------------------------------------------------------
+# Check for large file support
+#-----------------------------------------------------------------------------
+
+SET (LINUX_LFS 0)
+SET (HDF5_EXTRA_FLAGS)
+IF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.")
+ # Linux Specific flags
+ ADD_DEFINITIONS (-D_POSIX_SOURCE -D_BSD_SOURCE)
+ OPTION (HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON)
+ IF (HDF5_ENABLE_LARGE_FILE)
+ SET (LARGEFILE 1)
+ SET (HDF5_EXTRA_FLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
+ SET (CMAKE_REQUIRED_DEFINITIONS ${HDF5_EXTRA_FLAGS})
+ ENDIF (HDF5_ENABLE_LARGE_FILE)
+ENDIF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.")
+IF (LINUX_LFS)
+ SET (HDF5_EXTRA_FLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
+ SET (CMAKE_REQUIRED_DEFINITIONS ${HDF5_EXTRA_FLAGS})
+ENDIF (LINUX_LFS)
+ADD_DEFINITIONS (${HDF5_EXTRA_FLAGS})
+
+#-----------------------------------------------------------------------------
# Check the size in bytes of all the int and float types
#-----------------------------------------------------------------------------
MACRO (H5_CHECK_TYPE_SIZE type var)
@@ -531,6 +550,18 @@ ELSE (WINDOWS)
ENDIF (WINDOWS)
#-----------------------------------------------------------------------------
+# Option to see if GPFS is available on this filesystem --enable-gpfs
+#-----------------------------------------------------------------------------
+OPTION (HDF5_ENABLE_GPFS "Enable GPFS hints for the MPI/POSIX file driver" OFF)
+IF (HDF5_ENABLE_GPFS)
+ CHECK_INCLUDE_FILE_CONCAT ("gpfs.h" HAVE_GPFS)
+ IF (HAVE_GPFS)
+ HDF5_FUNCTION_TEST (HAVE_GPFS)
+ ENDIF (HAVE_GPFS)
+ENDIF (HDF5_ENABLE_GPFS)
+MARK_AS_ADVANCED (HDF5_ENABLE_GPFS)
+
+#-----------------------------------------------------------------------------
# Look for 64 bit file stream capability
#-----------------------------------------------------------------------------
IF (HAVE_OFF64_T)
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake
index 8b30fbf..99fbea1 100644
--- a/config/cmake/HDF5Macros.cmake
+++ b/config/cmake/HDF5Macros.cmake
@@ -120,3 +120,39 @@ MACRO (H5_SET_LIB_OPTIONS libtarget libname libtype)
ENDMACRO (H5_SET_LIB_OPTIONS)
+#-------------------------------------------------------------------------------
+MACRO (TARGET_WIN_PROPERTIES target)
+ IF (WIN32)
+ IF (MSVC)
+ IF (NOT BUILD_SHARED_LIBS)
+ SET_TARGET_PROPERTIES (${target}
+ PROPERTIES
+ LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
+ )
+ ENDIF (NOT BUILD_SHARED_LIBS)
+ ENDIF (MSVC)
+ ENDIF (WIN32)
+ENDMACRO (TARGET_WIN_PROPERTIES)
+
+#-------------------------------------------------------------------------------
+MACRO (TARGET_FORTRAN_WIN_PROPERTIES target)
+ IF (WIN32)
+ IF (BUILD_SHARED_LIBS)
+ IF (MSVC)
+ SET_TARGET_PROPERTIES (${target}
+ PROPERTIES
+ COMPILE_FLAGS "/dll"
+ LINK_FLAGS "/SUBSYSTEM:CONSOLE"
+ )
+ ENDIF (MSVC)
+ ELSE (BUILD_SHARED_LIBS)
+ IF (MSVC)
+ SET_TARGET_PROPERTIES (${target}
+ PROPERTIES
+ LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
+ )
+ ENDIF (MSVC)
+ ENDIF (BUILD_SHARED_LIBS)
+ ENDIF (WIN32)
+ENDMACRO (TARGET_FORTRAN_WIN_PROPERTIES)
+
diff --git a/config/cmake/HDF5Tests.c b/config/cmake/HDF5Tests.c
index f909ed9..7fb5756 100644
--- a/config/cmake/HDF5Tests.c
+++ b/config/cmake/HDF5Tests.c
@@ -371,4 +371,15 @@ int main(int argc, char * argv)
}
#endif
+#ifdef HAVE_GPFS
+
+#include <gpfs.h>
+int main ()
+{
+ int fd = 0;
+ gpfs_fcntl(fd, (void *)0);
+}
+
+#endif /* HAVE_GPFS */
+
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 446bc7e..71eaa34 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -25,31 +25,13 @@ SET (examples
FOREACH (example ${examples})
ADD_EXECUTABLE (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
H5_NAMING (${example})
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (${example}
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (${example})
TARGET_LINK_LIBRARIES (${example} ${HDF5_LIB_TARGET})
ENDFOREACH (example ${examples})
IF (H5_HAVE_PARALLEL)
ADD_EXECUTABLE (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
H5_NAMING (ph5example)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (ph5example
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (ph5example)
TARGET_LINK_LIBRARIES (ph5example ${HDF5_LIB_TARGET})
ENDIF (H5_HAVE_PARALLEL)
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index f1ed52f..04e6303 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -38,63 +38,33 @@ SET (examples
FOREACH (example ${examples})
ADD_EXECUTABLE (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
H5_NAMING (f90_ex_${example})
+ TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_${example})
IF (WIN32)
- IF (BUILD_SHARED_LIBS)
- IF (MSVC)
- SET_TARGET_PROPERTIES (f90_ex_${example}
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ENDIF (MSVC)
- ELSE (BUILD_SHARED_LIBS)
- IF (MSVC)
- SET_TARGET_PROPERTIES (f90_ex_${example}
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (MSVC)
- ENDIF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET f90_ex_${example}
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
- SET_TARGET_PROPERTIES (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
ENDIF (WIN32)
TARGET_LINK_LIBRARIES (f90_ex_${example}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
+ SET_TARGET_PROPERTIES (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
ENDFOREACH (example ${examples})
IF (H5_HAVE_PARALLEL)
ADD_EXECUTABLE (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
H5_NAMING (f90_ex_ph5example)
+ TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_ph5example)
IF (WIN32)
- IF (BUILD_SHARED_LIBS)
- IF (MSVC)
- SET_TARGET_PROPERTIES (f90_ex_ph5example
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ENDIF (MSVC)
- ELSE (BUILD_SHARED_LIBS)
- IF (MSVC)
- SET_TARGET_PROPERTIES (f90_ex_ph5example
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (MSVC)
- ENDIF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET f90_ex_ph5example
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
- SET_TARGET_PROPERTIES (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran)
ENDIF (WIN32)
TARGET_LINK_LIBRARIES (f90_ex_ph5example
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
+ SET_TARGET_PROPERTIES (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran)
ENDIF (H5_HAVE_PARALLEL)
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 26475e6..7c8c407 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -75,6 +75,7 @@ ADD_EXECUTABLE (testhdf5_fortran
tH5Z.f90
)
H5_NAMING (testhdf5_fortran)
+TARGET_FORTRAN_WIN_PROPERTIES (testhdf5_fortran)
TARGET_LINK_LIBRARIES (testhdf5_fortran
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
@@ -83,18 +84,6 @@ TARGET_LINK_LIBRARIES (testhdf5_fortran
IF (WIN32)
IF (MSVC)
TARGET_LINK_LIBRARIES (testhdf5_fortran "ws2_32.lib")
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (testhdf5_fortran
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (testhdf5_fortran
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (BUILD_SHARED_LIBS)
ENDIF (MSVC)
ENDIF (WIN32)
SET_TARGET_PROPERTIES (testhdf5_fortran PROPERTIES LINKER_LANGUAGE Fortran)
@@ -110,6 +99,7 @@ ADD_EXECUTABLE (testhdf5_fortran_1_8
tH5G_1_8.f90
)
H5_NAMING (testhdf5_fortran_1_8)
+TARGET_FORTRAN_WIN_PROPERTIES (testhdf5_fortran_1_8)
TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
@@ -118,18 +108,6 @@ TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8
IF (WIN32)
IF (MSVC)
TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8 "ws2_32.lib")
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (testhdf5_fortran_1_8
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (testhdf5_fortran_1_8
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (BUILD_SHARED_LIBS)
ENDIF (MSVC)
ENDIF (WIN32)
SET_TARGET_PROPERTIES (testhdf5_fortran_1_8 PROPERTIES LINKER_LANGUAGE Fortran)
@@ -139,6 +117,7 @@ ADD_TEST (NAME testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
#-- Adding test for fflush1
ADD_EXECUTABLE (fflush1 fflush1.f90)
H5_NAMING (fflush1)
+TARGET_FORTRAN_WIN_PROPERTIES (fflush1)
TARGET_LINK_LIBRARIES (fflush1
${HDF5_F90_LIB_TARGET}
${HDF5_F90_TEST_LIB_TARGET}
@@ -147,18 +126,6 @@ TARGET_LINK_LIBRARIES (fflush1
IF (WIN32)
IF (MSVC)
TARGET_LINK_LIBRARIES (fflush1 "ws2_32.lib")
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (fflush1
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (fflush1
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (BUILD_SHARED_LIBS)
ENDIF (MSVC)
ENDIF (WIN32)
SET_TARGET_PROPERTIES (fflush1 PROPERTIES LINKER_LANGUAGE Fortran)
@@ -168,6 +135,7 @@ ADD_TEST (NAME fflush1 COMMAND $<TARGET_FILE:fflush1>)
#-- Adding test for fflush2
ADD_EXECUTABLE (fflush2 fflush2.f90)
H5_NAMING (fflush2)
+TARGET_FORTRAN_WIN_PROPERTIES (fflush2)
TARGET_LINK_LIBRARIES (fflush2
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
@@ -176,18 +144,6 @@ TARGET_LINK_LIBRARIES (fflush2
IF (WIN32)
IF (MSVC)
TARGET_LINK_LIBRARIES (fflush2 "ws2_32.lib")
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (fflush2
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (fflush2
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (BUILD_SHARED_LIBS)
ENDIF (MSVC)
ENDIF (WIN32)
SET_TARGET_PROPERTIES (fflush2 PROPERTIES LINKER_LANGUAGE Fortran)
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index 4b9d4f1..7f702da 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -22,6 +22,7 @@ ADD_EXECUTABLE (parallel_test
mdset.f90
)
H5_NAMING (parallel_test)
+TARGET_FORTRAN_WIN_PROPERTIES (parallel_test)
TARGET_LINK_LIBRARIES (parallel_test
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
@@ -30,18 +31,6 @@ TARGET_LINK_LIBRARIES (parallel_test
IF (WIN32)
IF (MSVC)
TARGET_LINK_LIBRARIES (parallel_test "ws2_32.lib")
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (parallel_test
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (parallel_test
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (BUILD_SHARED_LIBS)
ENDIF (MSVC)
ENDIF (WIN32)
SET_TARGET_PROPERTIES (parallel_test PROPERTIES LINKER_LANGUAGE Fortran)
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index 0205309..23b0db3 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -13,16 +13,7 @@ INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_DIR}/src)
IF (HDF5_BUILD_EXAMPLES)
ADD_EXECUTABLE (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp)
H5_NAMING (ptExampleFL)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (ptExampleFL
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (ptExampleFL)
TARGET_LINK_LIBRARIES (
ptExampleFL
${HDF5_HL_CPP_LIB_TARGET}
@@ -34,16 +25,7 @@ IF (HDF5_BUILD_EXAMPLES)
ADD_EXECUTABLE (ptExampleVL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleVL.cpp)
H5_NAMING (ptExampleVL)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (ptExampleVL
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (ptExampleVL)
TARGET_LINK_LIBRARIES (
ptExampleVL
${HDF5_HL_CPP_LIB_TARGET}
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index afcb8fe..cf621a2 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -18,16 +18,7 @@ IF (BUILD_TESTING)
ADD_EXECUTABLE (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
H5_NAMING (hl_ptableTest)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_ptableTest
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (hl_ptableTest)
TARGET_LINK_LIBRARIES (
hl_ptableTest
${HDF5_LIB_TARGET}
diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt
index 0d29b7f..227f066 100644
--- a/hl/examples/CMakeLists.txt
+++ b/hl/examples/CMakeLists.txt
@@ -30,16 +30,7 @@ SET (examples
FOREACH (example ${examples})
ADD_EXECUTABLE (hl_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.c)
H5_NAMING (hl_ex_${example})
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_ex_${example}
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (hl_ex_${example})
TARGET_LINK_LIBRARIES (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
ENDFOREACH (example ${examples})
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index 3ba6969..5e20da3 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -19,22 +19,7 @@ SET (examples
FOREACH (example ${examples})
ADD_EXECUTABLE (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
H5_NAMING (hl_f90_ex_${example})
- IF (WIN32)
- IF (MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_ex_${example}
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_ex_${example}
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_FORTRAN_WIN_PROPERTIES (hl_f90_ex_${example})
TARGET_LINK_LIBRARIES (hl_f90_ex_${example}
${HDF5_HL_F90_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index f505dbd..b4f4075 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -15,22 +15,7 @@ LINK_DIRECTORIES (
#-- Adding test for hl_f90_tstlite
ADD_EXECUTABLE (hl_f90_tstlite tstlite.f90)
H5_NAMING (hl_f90_tstlite)
-IF (WIN32)
- IF (MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_tstlite
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_tstlite
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_FORTRAN_WIN_PROPERTIES (hl_f90_tstlite)
TARGET_LINK_LIBRARIES (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
SET_TARGET_PROPERTIES (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
@@ -39,22 +24,7 @@ ADD_TEST (NAME hl_f90_tstlite COMMAND $<TARGET_FILE:hl_f90_tstlite>)
#-- Adding test for hl_f90_tstimage
ADD_EXECUTABLE (hl_f90_tstimage tstimage.f90)
H5_NAMING (hl_f90_tstimage)
-IF (WIN32)
- IF (MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_tstimage
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_tstimage
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_FORTRAN_WIN_PROPERTIES (hl_f90_tstimage)
TARGET_LINK_LIBRARIES (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
SET_TARGET_PROPERTIES (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
@@ -63,22 +33,7 @@ ADD_TEST (NAME hl_f90_tstimage COMMAND $<TARGET_FILE:hl_f90_tstimage>)
#-- Adding test for hl_f90_tsttable
ADD_EXECUTABLE (hl_f90_tsttable tsttable.f90)
H5_NAMING (hl_f90_tsttable)
-IF (WIN32)
- IF (MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_tsttable
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_f90_tsttable
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_FORTRAN_WIN_PROPERTIES (hl_f90_tsttable)
TARGET_LINK_LIBRARIES (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
SET_TARGET_PROPERTIES (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran)
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index d016aed..182fd14 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -23,16 +23,7 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
MACRO (HL_ADD_TEST hl_name files)
ADD_EXECUTABLE (hl_${hl_name} ${hl_name}.c)
H5_NAMING (hl_${hl_name})
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_${hl_name}
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (hl_${hl_name})
TARGET_LINK_LIBRARIES (hl_${hl_name}
${HDF5_HL_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -70,16 +61,7 @@ HL_ADD_TEST (test_table "test_table_be.hdf5;test_table_cray.hdf5;test_table_le.h
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (hl_gen_test_ds gen_test_ds.c)
H5_NAMING (hl_gen_test_ds)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hl_gen_test_ds
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (hl_gen_test_ds)
TARGET_LINK_LIBRARIES (hl_gen_test_ds
${HDF5_HL_LIB_TARGET}
${HDF5_LIB_TARGET}
diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt
index 62a0ea5..388b1da 100644
--- a/hl/tools/CMakeLists.txt
+++ b/hl/tools/CMakeLists.txt
@@ -19,16 +19,7 @@ INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5)
ADD_EXECUTABLE (gif2h5 ${GIF2H5_SRCS})
H5_NAMING (gif2h5)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (gif2h5
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (gif2h5)
TARGET_LINK_LIBRARIES (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
#-- Add h52gif program
@@ -38,16 +29,7 @@ SET (hdf2gif_SRCS
)
ADD_EXECUTABLE (hdf2gif ${hdf2gif_SRCS})
H5_NAMING (hdf2gif)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (hdf2gif
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (hdf2gif)
TARGET_LINK_LIBRARIES (hdf2gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
# --------------------------------------------------------------------
@@ -58,14 +40,7 @@ TARGET_LINK_LIBRARIES (hdf2gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_T
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (hl_h52gifgentest ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/h52gifgentst.c)
H5_NAMING (hl_h52gifgentest)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (hl_h52gifgentest
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (hl_h52gifgentest)
TARGET_LINK_LIBRARIES (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
# ADD_TEST (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>)
diff --git a/perform/CMakeLists.txt b/perform/CMakeLists.txt
index 6168bb3..2c0c517 100644
--- a/perform/CMakeLists.txt
+++ b/perform/CMakeLists.txt
@@ -19,16 +19,7 @@ SET (h5perf_serial_SRCS
)
ADD_EXECUTABLE (h5perf_serial ${h5perf_serial_SRCS})
H5_NAMING (h5perf_serial)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5perf_serial
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (h5perf_serial)
TARGET_LINK_LIBRARIES (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
ADD_TEST (NAME h5perf_serial COMMAND $<TARGET_FILE:h5perf_serial>)
@@ -39,16 +30,7 @@ SET (chunk_SRCS
)
ADD_EXECUTABLE(chunk ${chunk_SRCS})
H5_NAMING (chunk)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (chunk
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (chunk)
TARGET_LINK_LIBRARIES(chunk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
ADD_TEST (NAME chunk COMMAND $<TARGET_FILE:chunk>)
@@ -59,16 +41,7 @@ SET (iopipe_SRCS
)
ADD_EXECUTABLE (iopipe ${iopipe_SRCS})
H5_NAMING (iopipe)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (iopipe
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (iopipe)
TARGET_LINK_LIBRARIES (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
ADD_TEST (NAME iopipe COMMAND $<TARGET_FILE:iopipe>)
@@ -79,16 +52,7 @@ SET (overhead_SRCS
)
ADD_EXECUTABLE (overhead ${overhead_SRCS})
H5_NAMING (overhead)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (overhead
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (overhead)
TARGET_LINK_LIBRARIES (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
ADD_TEST (NAME overhead COMMAND $<TARGET_FILE:overhead>)
@@ -99,16 +63,7 @@ SET (perf_meta_SRCS
)
ADD_EXECUTABLE (perf_meta ${perf_meta_SRCS})
H5_NAMING (perf_meta)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (perf_meta
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (perf_meta)
TARGET_LINK_LIBRARIES (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
ADD_TEST (NAME perf_meta COMMAND $<TARGET_FILE:perf_meta>)
@@ -119,16 +74,7 @@ SET (zip_perf_SRCS
)
ADD_EXECUTABLE (zip_perf ${zip_perf_SRCS})
H5_NAMING (zip_perf)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (zip_perf
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (zip_perf)
TARGET_LINK_LIBRARIES (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_TEST (NAME zip_perf COMMAND $<TARGET_FILE:zip_perf> "-h")
@@ -142,16 +88,7 @@ IF (H5_HAVE_PARALLEL)
)
ADD_EXECUTABLE (h5perf ${h5perf_SRCS})
H5_NAMING (h5perf)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5perf
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIESS (h5perf)
TARGET_LINK_LIBRARIES (h5perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
ADD_TEST (NAME h5perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf>)
@@ -162,16 +99,7 @@ IF (H5_HAVE_PARALLEL)
)
ADD_EXECUTABLE (benchpar ${benchpar_SRCS})
H5_NAMING (benchpar)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (benchpar
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (benchpar)
TARGET_LINK_LIBRARIES (benchpar ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
ADD_TEST (NAME benchpar COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:benchpar>)
@@ -182,16 +110,7 @@ IF (H5_HAVE_PARALLEL)
)
ADD_EXECUTABLE (mpi-perf ${mpi-perf_SRCS})
H5_NAMING (mpi-perf)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (mpi-perf
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (mpi-perf)
TARGET_LINK_LIBRARIES (mpi-perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
ADD_TEST (NAME mpi-perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:mpi-perf>)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index bbf7894..0bec69f 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -148,16 +148,7 @@ SET (testhdf5_SRCS
#-- Adding test for testhdf5
ADD_EXECUTABLE (testhdf5 ${testhdf5_SRCS})
H5_NAMING (testhdf5)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (testhdf5
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (testhdf5)
TARGET_LINK_LIBRARIES (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_TEST (NAME testhdf5 COMMAND $<TARGET_FILE:testhdf5>)
@@ -171,16 +162,7 @@ ADD_TEST (NAME testhdf5 COMMAND $<TARGET_FILE:testhdf5>)
MACRO (ADD_H5_TEST file)
ADD_EXECUTABLE (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
H5_NAMING (${file})
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (${file}
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (${file})
TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_TEST (NAME ${file} COMMAND $<TARGET_FILE:${file}>)
@@ -254,16 +236,7 @@ ENDIF (WIN32)
#-- Adding test for cache
ADD_EXECUTABLE (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
H5_NAMING (cache)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (cache
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (cache)
TARGET_LINK_LIBRARIES (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
ADD_TEST (NAME cache COMMAND $<TARGET_FILE:cache>)
@@ -271,16 +244,7 @@ ADD_TEST (NAME cache COMMAND $<TARGET_FILE:cache>)
#-- Adding test for cache_api
ADD_EXECUTABLE (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
H5_NAMING (cache_api)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (cache_api
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (cache_api)
TARGET_LINK_LIBRARIES (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
ADD_TEST (NAME cache_api COMMAND $<TARGET_FILE:cache_api>)
@@ -288,16 +252,7 @@ ADD_TEST (NAME cache_api COMMAND $<TARGET_FILE:cache_api>)
#-- Adding test for cache_tagging
ADD_EXECUTABLE (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
H5_NAMING (cache_tagging)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (cache_tagging
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (cache_tagging)
TARGET_LINK_LIBRARIES (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
ADD_TEST (NAME cache_tagging COMMAND $<TARGET_FILE:cache_tagging>)
@@ -310,16 +265,7 @@ ADD_EXECUTABLE (ttsafe
${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c
)
H5_NAMING (ttsafe)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (ttsafe
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (ttsafe)
TARGET_LINK_LIBRARIES (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
ADD_TEST (NAME ttsafe COMMAND $<TARGET_FILE:ttsafe>)
@@ -334,16 +280,7 @@ IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
MACRO (ADD_H5_GENERATOR genfile)
ADD_EXECUTABLE (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c)
H5_NAMING (${genfile})
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (${genfile}
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (${genfile})
TARGET_LINK_LIBRARIES (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
ENDMACRO (ADD_H5_GENERATOR genfile)
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 05e0ced..c378506 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -23,16 +23,7 @@ SET (testphdf5_SRCS
#-- Adding test for testhdf5
ADD_EXECUTABLE (testphdf5 ${testphdf5_SRCS})
H5_NAMING (testphdf5)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (testphdf5
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (testphdf5)
TARGET_LINK_LIBRARIES (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_TEST (NAME testphdf5 COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:testphdf5>)
@@ -40,16 +31,7 @@ ADD_TEST (NAME testphdf5 COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPRO
MACRO (ADD_H5P_TEST file)
ADD_EXECUTABLE (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c)
H5_NAMING (${file})
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (${file}
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (${file})
TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_TEST (NAME ${file} COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:${file}>)
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt
index b9dad2d..afdd582 100644
--- a/tools/h5copy/CMakeLists.txt
+++ b/tools/h5copy/CMakeLists.txt
@@ -12,16 +12,7 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test)
# --------------------------------------------------------------------
ADD_EXECUTABLE (h5copy ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c)
H5_NAMING (h5copy)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5copy
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (h5copy)
TARGET_LINK_LIBRARIES (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES h5copy)
@@ -36,14 +27,7 @@ IF (BUILD_TESTING)
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (h5copygentest ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copygentest.c)
H5_NAMING (h5copygentest)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (h5copygentest
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (h5copygentest)
TARGET_LINK_LIBRARIES (h5copygentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
#ADD_TEST (NAME h5copygentest COMMAND $<TARGET_FILE:h5copygentest>)
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt
index 1342cd2..820c3d0 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -15,16 +15,7 @@ ADD_EXECUTABLE (h5diff
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_main.c
)
H5_NAMING (h5diff)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5diff
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (h5diff)
TARGET_LINK_LIBRARIES (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES h5diff)
@@ -42,14 +33,7 @@ IF (BUILD_TESTING)
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (h5diffgentest ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diffgentest.c)
H5_NAMING (h5diffgentest)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (h5diffgentest
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (h5diffgentest)
TARGET_LINK_LIBRARIES (h5diffgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
#ADD_TEST (NAME h5diffgentest COMMAND $<TARGET_FILE:h5diffgentest>)
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index 5ef1cc2..e64bc48 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -12,16 +12,7 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test)
# --------------------------------------------------------------------
ADD_EXECUTABLE (h5dump ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump.c)
H5_NAMING (h5dump)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5dump
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (h5dump)
TARGET_LINK_LIBRARIES (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES h5dump)
@@ -39,14 +30,7 @@ IF (BUILD_TESTING)
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (h5dumpgentest ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dumpgentest.c)
H5_NAMING (h5dumpgentest)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (h5dumpgentest
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (h5dumpgentest)
TARGET_LINK_LIBRARIES (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
#ADD_TEST (NAME h5dumpgentest COMMAND $<TARGET_FILE:h5dumpgentest>)
diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt
index 3c82492..7d937bd 100644
--- a/tools/h5import/CMakeLists.txt
+++ b/tools/h5import/CMakeLists.txt
@@ -12,16 +12,7 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test)
# --------------------------------------------------------------------
ADD_EXECUTABLE (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c)
H5_NAMING (h5import)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5import
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (h5import)
TARGET_LINK_LIBRARIES (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES h5import)
@@ -38,16 +29,7 @@ IF (BUILD_TESTING)
# --------------------------------------------------------------------
ADD_EXECUTABLE (h5importtest ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5importtest.c)
H5_NAMING (h5importtest)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5importtest
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (h5importtest)
TARGET_LINK_LIBRARIES (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
##############################################################################
diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt
index 61b8c84..94f2e4b 100644
--- a/tools/h5jam/CMakeLists.txt
+++ b/tools/h5jam/CMakeLists.txt
@@ -12,58 +12,22 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test)
# --------------------------------------------------------------------
ADD_EXECUTABLE (h5jam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jam.c)
H5_NAMING (h5jam)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5jam
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (h5jam)
TARGET_LINK_LIBRARIES (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_EXECUTABLE (getub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/getub.c)
H5_NAMING (getub)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (getub
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (getub)
TARGET_LINK_LIBRARIES (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_EXECUTABLE (tellub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/tellub.c)
H5_NAMING (tellub)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (tellub
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (tellub)
TARGET_LINK_LIBRARIES (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_EXECUTABLE (h5unjam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5unjam.c)
H5_NAMING (h5unjam)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5unjam
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (h5unjam)
TARGET_LINK_LIBRARIES (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES
@@ -86,14 +50,7 @@ IF (BUILD_TESTING)
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (h5jamgentest ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jamgentest.c)
H5_NAMING (h5jamgentest)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (h5jamgentest
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (h5jamgentest)
TARGET_LINK_LIBRARIES (h5jamgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
#ADD_TEST (NAME h5jamgentest COMMAND $<TARGET_FILE:h5jamgentest>)
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt
index 1d2589a..ddb0bfe 100644
--- a/tools/h5ls/CMakeLists.txt
+++ b/tools/h5ls/CMakeLists.txt
@@ -12,16 +12,7 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test)
#-----------------------------------------------------------------------------
ADD_EXECUTABLE (h5ls ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c)
H5_NAMING (h5ls)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5ls
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (h5ls)
TARGET_LINK_LIBRARIES (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index d767de1..618c4a1 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -22,16 +22,7 @@ SET (REPACK_COMMON_SRCS
ADD_EXECUTABLE (h5repack ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c)
H5_NAMING (h5repack)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5repack
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (h5repack)
TARGET_LINK_LIBRARIES (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES h5repack)
@@ -48,16 +39,7 @@ IF (BUILD_TESTING)
# --------------------------------------------------------------------
ADD_EXECUTABLE (testh5repack_detect_szip ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c)
H5_NAMING (testh5repack_detect_szip)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (testh5repack_detect_szip
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (testh5repack_detect_szip)
TARGET_LINK_LIBRARIES (testh5repack_detect_szip ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
ADD_TEST (NAME testh5repack_detect_szip COMMAND $<TARGET_FILE:testh5repack_detect_szip>)
@@ -76,16 +58,7 @@ IF (BUILD_TESTING)
ADD_EXECUTABLE (h5repacktest ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repacktst.c)
H5_NAMING (h5repacktest)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5repacktest
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (h5repacktest)
TARGET_LINK_LIBRARIES (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
ADD_TEST (NAME h5repacktest COMMAND $<TARGET_FILE:h5repacktest>)
diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt
index b900afb..1640479 100644
--- a/tools/h5stat/CMakeLists.txt
+++ b/tools/h5stat/CMakeLists.txt
@@ -12,16 +12,7 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test)
# --------------------------------------------------------------------
ADD_EXECUTABLE (h5stat ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c)
H5_NAMING (h5stat)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5stat
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (h5stat)
TARGET_LINK_LIBRARIES (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES h5stat)
@@ -39,14 +30,7 @@ IF (BUILD_TESTING)
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (h5stat_gentest ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat_gentest.c)
H5_NAMING (h5stat_gentest)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (h5stat_gentest
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (h5stat_gentest)
TARGET_LINK_LIBRARIES (h5stat_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
#ADD_TEST (NAME h5stat_gentest COMMAND $<TARGET_FILE:h5stat_gentest>)
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt
index 8e7e6bf..1726ae1 100644
--- a/tools/misc/CMakeLists.txt
+++ b/tools/misc/CMakeLists.txt
@@ -13,44 +13,17 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test)
#-- Misc Executables
ADD_EXECUTABLE (h5debug ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5debug.c)
H5_NAMING (h5debug)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5debug
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (h5debug)
TARGET_LINK_LIBRARIES (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
ADD_EXECUTABLE (h5repart ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart.c)
H5_NAMING (h5repart)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5repart
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (h5repart)
TARGET_LINK_LIBRARIES (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
ADD_EXECUTABLE (h5mkgrp ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5mkgrp.c)
H5_NAMING (h5mkgrp)
-IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5mkgrp
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
-ENDIF (WIN32)
+TARGET_WIN_PROPERTIES (h5mkgrp)
TARGET_LINK_LIBRARIES (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES
@@ -72,30 +45,14 @@ IF (BUILD_TESTING)
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (h5repart_gentest ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart_gentest.c)
H5_NAMING (h5repart_gentest)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (h5repart_gentest
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (h5repart_gentest)
TARGET_LINK_LIBRARIES (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
#ADD_TEST (NAME h5repart_gentest COMMAND $<TARGET_FILE:h5repart_gentest>)
ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c)
H5_NAMING (h5repart_test)
- IF (WIN32)
- IF (MSVC)
- IF (NOT BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (h5repart_test
- PROPERTIES
- LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
- )
- ENDIF (NOT BUILD_SHARED_LIBS)
- ENDIF (MSVC)
- ENDIF (WIN32)
+ TARGET_WIN_PROPERTIES (h5repart_test)
TARGET_LINK_LIBRARIES (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
# --------------------------------------------------------------------