summaryrefslogtreecommitdiffstats
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt77
1 files changed, 7 insertions, 70 deletions
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)