diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-06-29 20:04:46 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-06-29 20:04:46 (GMT) |
commit | 286b06971d15fc8a9df23144ff3ceb2c448c3520 (patch) | |
tree | bfdd81e3403074e10d6b63677737d2fa0b434532 /test/CMakeLists.txt | |
parent | 5ed817f734dbc8252e2066db751c26d354af0b30 (diff) | |
download | hdf5-286b06971d15fc8a9df23144ff3ceb2c448c3520.zip hdf5-286b06971d15fc8a9df23144ff3ceb2c448c3520.tar.gz hdf5-286b06971d15fc8a9df23144ff3ceb2c448c3520.tar.bz2 |
[svn-r19036] Added executable Linker Flag for MSVC static builds: /NODEFAULTLIB:MSVCRT
Added VERSION vars for inclusion into auto snapshot version update script
Tested windows
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r-- | test/CMakeLists.txt | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 37ca0ac..169ecde 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}>) @@ -127,19 +147,40 @@ ENDFOREACH (test ${H5_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>) +#-- 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>) |