summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt10
-rw-r--r--c++/examples/CMakeLists.txt10
-rw-r--r--c++/test/CMakeLists.txt10
-rw-r--r--examples/CMakeLists.txt20
-rw-r--r--fortran/examples/CMakeLists.txt7
-rw-r--r--fortran/test/CMakeLists.txt20
-rw-r--r--hl/c++/examples/CMakeLists.txt20
-rw-r--r--hl/c++/test/CMakeLists.txt10
-rw-r--r--hl/examples/CMakeLists.txt10
-rw-r--r--hl/fortran/examples/CMakeLists.txt17
-rw-r--r--hl/fortran/test/CMakeLists.txt81
-rw-r--r--hl/test/CMakeLists.txt20
-rw-r--r--hl/tools/CMakeLists.txt28
-rw-r--r--perform/CMakeLists.txt60
-rw-r--r--test/CMakeLists.txt52
-rw-r--r--testpar/CMakeLists.txt20
-rw-r--r--tools/h5copy/CMakeLists.txt18
-rw-r--r--tools/h5diff/CMakeLists.txt18
-rw-r--r--tools/h5dump/CMakeLists.txt18
-rw-r--r--tools/h5import/CMakeLists.txt20
-rw-r--r--tools/h5jam/CMakeLists.txt48
-rw-r--r--tools/h5ls/CMakeLists.txt10
-rw-r--r--tools/h5repack/CMakeLists.txt30
-rw-r--r--tools/h5stat/CMakeLists.txt18
-rw-r--r--tools/misc/CMakeLists.txt48
25 files changed, 580 insertions, 43 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 627f8b6..5430cc7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,11 +78,15 @@ PROJECT (HDF5 C CXX)
#-----------------------------------------------------------------------------
# Basic HDF5 stuff here
#-----------------------------------------------------------------------------
+SET (H5_VERS_MAJOR 1)
+SET (H5_VERS_MINOR 9)
+SET (H5_VERS_RELEASE 72)
+#-----------------------------------------------------------------------------
SET (HDF5_PACKAGE "hdf5")
SET (HDF5_PACKAGE_NAME "HDF5")
-SET (HDF5_PACKAGE_VERSION 1.9)
-SET (HDF5_PACKAGE_VERSION_MAJOR 1.9)
-SET (HDF5_PACKAGE_VERSION_MINOR 0)
+SET (HDF5_PACKAGE_VERSION "${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}")
+SET (HDF5_PACKAGE_VERSION_MAJOR "${H5_VERS_MAJOR}.${H5_VERS_MINOR}")
+SET (HDF5_PACKAGE_VERSION_MINOR "${H5_VERS_RELEASE}")
SET (HDF5_PACKAGE_STRING "${HDF5_PACKAGE_NAME} ${HDF5_PACKAGE_VERSION}")
SET (HDF5_PACKAGE_TARNAME "hdf5")
SET (HDF5_PACKAGE_URL "htt://www.hdfgroup.org")
diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt
index 1a9602a..75644a8 100644
--- a/c++/examples/CMakeLists.txt
+++ b/c++/examples/CMakeLists.txt
@@ -23,5 +23,15 @@ 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_LINK_LIBRARIES (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
ENDFOREACH (example ${examples})
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index ac72772..770348e 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -38,6 +38,16 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SOURCE_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_LINK_LIBRARIES (cpp_testhdf5
${HDF5_CPP_LIB_TARGET}
${HDF5_LIB_TARGET}
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index fdd3f80..446bc7e 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -25,11 +25,31 @@ 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_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_LINK_LIBRARIES (ph5example ${HDF5_LIB_TARGET})
ENDIF (H5_HAVE_PARALLEL)
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 00b76a4..f8a453e 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -47,6 +47,13 @@ FOREACH (example ${examples})
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
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index ec75c95..7875f97 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -89,6 +89,11 @@ IF (WIN32)
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)
@@ -119,6 +124,11 @@ IF (WIN32)
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)
@@ -143,6 +153,11 @@ IF (WIN32)
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)
@@ -167,6 +182,11 @@ IF (WIN32)
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)
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index cbe2626..8fcb9bd 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -13,6 +13,16 @@ INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SOURCE_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_LINK_LIBRARIES (
ptExampleFL
${HDF5_HL_CPP_LIB_TARGET}
@@ -22,6 +32,16 @@ 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_LINK_LIBRARIES (
ptExampleVL
${HDF5_HL_CPP_LIB_TARGET}
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index c0a94f8..e9b09da 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -18,6 +18,16 @@ 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_LINK_LIBRARIES (
hl_ptableTest
${HDF5_LIB_TARGET}
diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt
index 934856a..0d29b7f 100644
--- a/hl/examples/CMakeLists.txt
+++ b/hl/examples/CMakeLists.txt
@@ -30,6 +30,16 @@ 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_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 64fd9df..bd9a695 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -19,17 +19,22 @@ SET (examples
FOREACH (example ${examples})
ADD_EXECUTABLE (hl_f90_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.f90)
H5_NAMING (hl_f90_ex_${example})
- IF (BUILD_SHARED_LIBS)
- IF (WIN32)
- IF (MSVC)
+ IF (WIN32)
+ IF (MSVC)
+ IF (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES (hl_f90_ex_${example}
PROPERTIES
COMPILE_FLAGS "/dll"
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
)
- ENDIF (MSVC)
- ENDIF (WIN32)
- ENDIF (BUILD_SHARED_LIBS)
+ 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_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 41cb675..14bd622 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -15,17 +15,22 @@ LINK_DIRECTORIES (
#-- Adding test for hl_f90_tstlite
ADD_EXECUTABLE (hl_f90_tstlite tstlite.f90)
H5_NAMING (hl_f90_tstlite)
-IF (BUILD_SHARED_LIBS)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (hl_f90_tstlite
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
-ENDIF (BUILD_SHARED_LIBS)
+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_LINK_LIBRARIES (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
SET_TARGET_PROPERTIES (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
@@ -34,17 +39,22 @@ 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 (BUILD_SHARED_LIBS)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (hl_f90_tstimage
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
-ENDIF (BUILD_SHARED_LIBS)
+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_LINK_LIBRARIES (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
SET_TARGET_PROPERTIES (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
@@ -53,17 +63,22 @@ 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 (BUILD_SHARED_LIBS)
- IF (WIN32)
- IF (MSVC)
- SET_TARGET_PROPERTIES (hl_f90_tsttable
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
- ENDIF (MSVC)
- ENDIF (WIN32)
-ENDIF (BUILD_SHARED_LIBS)
+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_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 8397417..91d7c80 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -24,6 +24,16 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SOURCE_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_LINK_LIBRARIES (hl_${hl_name}
${HDF5_HL_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -59,6 +69,16 @@ HL_ADD_TEST (test_table "test_table_be.hdf5;test_table_cray.hdf5;test_table_le.h
IF (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_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 b99e742..e8c729d 100644
--- a/hl/tools/CMakeLists.txt
+++ b/hl/tools/CMakeLists.txt
@@ -19,6 +19,16 @@ 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_LINK_LIBRARIES (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
#-- Add h52gif program
@@ -28,6 +38,16 @@ 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_LINK_LIBRARIES (hdf2gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
# --------------------------------------------------------------------
@@ -38,6 +58,14 @@ TARGET_LINK_LIBRARIES (hdf2gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_T
IF (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_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 57cda13..a0b7fae 100644
--- a/perform/CMakeLists.txt
+++ b/perform/CMakeLists.txt
@@ -19,6 +19,16 @@ 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_LINK_LIBRARIES (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
ADD_TEST (NAME h5perf_serial COMMAND $<TARGET_FILE:h5perf_serial>)
@@ -29,6 +39,16 @@ 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_LINK_LIBRARIES(chunk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
ADD_TEST (NAME chunk COMMAND $<TARGET_FILE:chunk>)
@@ -39,6 +59,16 @@ 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_LINK_LIBRARIES (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
ADD_TEST (NAME iopipe COMMAND $<TARGET_FILE:iopipe>)
@@ -49,6 +79,16 @@ 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_LINK_LIBRARIES (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
ADD_TEST (NAME overhead COMMAND $<TARGET_FILE:overhead>)
@@ -59,6 +99,16 @@ 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_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>)
@@ -69,6 +119,16 @@ 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_LINK_LIBRARIES (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_TEST (NAME zip_perf COMMAND $<TARGET_FILE:zip_perf> "-h")
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index b0269f2..ae5786a 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -62,6 +62,16 @@ 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_LINK_LIBRARIES (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_TEST (NAME testhdf5 COMMAND $<TARGET_FILE:testhdf5>)
@@ -69,6 +79,16 @@ 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_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_TEST (NAME ${file} COMMAND $<TARGET_FILE:${file}>)
@@ -132,12 +152,22 @@ ENDFOREACH (chktest ${H5_CHECK_TESTS})
#-- Allow extra time for fheap to complete 30min
IF (WIN32)
- SET_TESTS_PROPERTIES (fheap PROPERTIES TIMEOUT 1800)
+ SET_TESTS_PROPERTIES (fheap PROPERTIES TIMEOUT 2500)
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_LINK_LIBRARIES (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
ADD_TEST (NAME cache COMMAND $<TARGET_FILE:cache>)
@@ -145,6 +175,16 @@ 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_LINK_LIBRARIES (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
ADD_TEST (NAME cache_api COMMAND $<TARGET_FILE:cache_api>)
@@ -152,6 +192,16 @@ 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_LINK_LIBRARIES (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
ADD_TEST (NAME cache_tagging COMMAND $<TARGET_FILE:cache_tagging>)
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index cf12342..0eac602 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -20,6 +20,16 @@ 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_LINK_LIBRARIES (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_TEST (NAME testphdf5 COMMAND $<TARGET_FILE:testphdf5>)
@@ -27,6 +37,16 @@ ADD_TEST (NAME testphdf5 COMMAND $<TARGET_FILE:testphdf5>)
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_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
ADD_TEST (NAME ${file} COMMAND $<TARGET_FILE:${file}>)
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt
index 62411ea..61f5ef3 100644
--- a/tools/h5copy/CMakeLists.txt
+++ b/tools/h5copy/CMakeLists.txt
@@ -12,6 +12,16 @@ 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_LINK_LIBRARIES (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES h5copy)
@@ -20,6 +30,14 @@ IF (BUILD_TESTING)
IF (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_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 04a9102..9461875 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -15,6 +15,16 @@ 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_LINK_LIBRARIES (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES h5diff)
@@ -23,6 +33,14 @@ IF (BUILD_TESTING)
IF (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_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 d78b314..eb54e00 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -12,6 +12,16 @@ 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_LINK_LIBRARIES (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES h5dump)
@@ -20,6 +30,14 @@ IF (BUILD_TESTING)
IF (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_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 50d90e5..8eea2c1 100644
--- a/tools/h5import/CMakeLists.txt
+++ b/tools/h5import/CMakeLists.txt
@@ -12,6 +12,16 @@ 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_LINK_LIBRARIES (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES h5import)
@@ -19,6 +29,16 @@ SET (H5_DEP_EXECUTABLES h5import)
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_LINK_LIBRARIES (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
ADD_TEST (NAME h5importtest COMMAND $<TARGET_FILE:h5importtest>)
diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt
index 03ec913..166d272 100644
--- a/tools/h5jam/CMakeLists.txt
+++ b/tools/h5jam/CMakeLists.txt
@@ -12,18 +12,58 @@ 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_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_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_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_LINK_LIBRARIES (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES
@@ -37,6 +77,14 @@ IF (BUILD_TESTING)
IF (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_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 fe9f927..c2d9100 100644
--- a/tools/h5ls/CMakeLists.txt
+++ b/tools/h5ls/CMakeLists.txt
@@ -13,6 +13,16 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test)
#-- Add the h5ls executable
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_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 67c9f68..cbf40a5 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -22,6 +22,16 @@ SET (REPACK_COMMON_SRCS
INCLUDE_DIRECTORIES (${HDF5_TEST_SOURCE_DIR})
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_LINK_LIBRARIES (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES h5repack)
@@ -29,6 +39,16 @@ SET (H5_DEP_EXECUTABLES h5repack)
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_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>)
@@ -42,6 +62,16 @@ 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_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 d9407ef..b19d288 100644
--- a/tools/h5stat/CMakeLists.txt
+++ b/tools/h5stat/CMakeLists.txt
@@ -12,6 +12,16 @@ 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_LINK_LIBRARIES (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES h5stat)
@@ -20,6 +30,14 @@ IF (BUILD_TESTING)
IF (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_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 5583b3d..321d0f0 100644
--- a/tools/misc/CMakeLists.txt
+++ b/tools/misc/CMakeLists.txt
@@ -13,14 +13,44 @@ 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_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_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_LINK_LIBRARIES (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES
@@ -65,12 +95,30 @@ IF (BUILD_TESTING)
IF (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_LINK_LIBRARIES (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
#ADD_TEST (NAME h5repart_gentest COMMAND $<TARGET_FILE:h5repart_gentest>)
ENDIF (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_LINK_LIBRARIES (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
# repartition family member size to 20,000 bytes.