From 86313eb281deea495200c63f10d5efce38d3350c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 29 Dec 2010 13:52:34 -0500 Subject: [svn-r19895] Remove use of /MT compile flag for building static libs and programs. Added BUILT_AS_STATIC_LIBRARY define to set the windows import/export defines correctly for static libraries. --- CMakeLists.txt | 28 +++++----------------------- c++/examples/CMakeLists.txt | 1 - c++/test/CMakeLists.txt | 1 - config/cmake/H5pubconf.h.in | 9 +++++++++ config/cmake/HDF5Macros.cmake | 23 ----------------------- examples/CMakeLists.txt | 2 -- hl/c++/examples/CMakeLists.txt | 2 -- hl/c++/test/CMakeLists.txt | 1 - hl/examples/CMakeLists.txt | 1 - hl/test/CMakeLists.txt | 2 -- hl/tools/CMakeLists.txt | 3 --- perform/CMakeLists.txt | 11 ----------- src/H5api_adpt.h | 16 ++++++++++++++++ test/CMakeLists.txt | 10 ---------- testpar/CMakeLists.txt | 2 -- tools/h5copy/CMakeLists.txt | 2 -- tools/h5diff/CMakeLists.txt | 2 -- tools/h5dump/CMakeLists.txt | 2 -- tools/h5import/CMakeLists.txt | 2 -- tools/h5jam/CMakeLists.txt | 5 ----- tools/h5ls/CMakeLists.txt | 1 - tools/h5repack/CMakeLists.txt | 3 --- tools/h5stat/CMakeLists.txt | 2 -- tools/misc/CMakeLists.txt | 5 ----- 24 files changed, 30 insertions(+), 106 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ad6bcd..ea62baa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -240,35 +240,13 @@ SET (LIB_TYPE STATIC) IF (BUILD_SHARED_LIBS) SET (LIB_TYPE SHARED) SET (H5_BUILT_AS_DYNAMIC_LIB 1) - IF (MSVC) - SET (CMAKE_MFC_FLAG 0) - FOREACH (flag_var - CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE - CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO - CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE - CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) - IF (${flag_var} MATCHES "/MT") - STRING (REGEX REPLACE "/MT" "/MD" ${flag_var} "${${flag_var}}") - ENDIF (${flag_var} MATCHES "/MT") - ENDFOREACH (flag_var) ENDIF (MSVC) ELSE (BUILD_SHARED_LIBS) + SET (H5_BUILT_AS_STATIC_LIB 1) IF (NOT WIN32) # should this be a user setting : Everyone uses it anyway ? ADD_DEFINITIONS (-DPIC) ENDIF (NOT WIN32) - IF (MSVC) - SET (CMAKE_MFC_FLAG 0) - FOREACH (flag_var - CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE - CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO - CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE - CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) - IF (${flag_var} MATCHES "/MD") - STRING (REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") - ENDIF (${flag_var} MATCHES "/MD") - ENDFOREACH (flag_var) - ENDIF (MSVC) ENDIF (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- @@ -314,6 +292,10 @@ IF (WIN32) ENDIF (NOT CYGWIN) ENDIF (WIN32) +IF (MSVC) + SET (CMAKE_MFC_FLAG 0) +ENDIF (MSVC) + SET (MAKE_SYSTEM) IF (CMAKE_BUILD_TOOL MATCHES "make") SET (MAKE_SYSTEM 1) diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt index 053cbd5..9bbb9a3 100644 --- a/c++/examples/CMakeLists.txt +++ b/c++/examples/CMakeLists.txt @@ -23,7 +23,6 @@ SET (examples FOREACH (example ${examples}) ADD_EXECUTABLE (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp) H5_NAMING (cpp_ex_${example}) - TARGET_WIN_PROPERTIES (cpp_ex_${example}) TARGET_LINK_LIBRARIES (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET}) IF (BUILD_TESTING) diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index 569e609..a50a643 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -37,7 +37,6 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR} ) ADD_EXECUTABLE (cpp_testhdf5 ${CPP_TEST_SRCS} ) H5_NAMING (cpp_testhdf5) -TARGET_WIN_PROPERTIES (cpp_testhdf5) TARGET_LINK_LIBRARIES (cpp_testhdf5 ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET} diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 51140f2..0dbd1ec 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -16,12 +16,21 @@ /* Defined if HDF5 was built with CMake AND build as a shared library */ #cmakedefine H5_BUILT_AS_DYNAMIC_LIB @H5_BUILT_AS_DYNAMIC_LIB@ +/* Defined if HDF5 was built with CMake AND build as a static library */ +#cmakedefine H5_BUILT_AS_STATIC_LIB @H5_BUILT_AS_STATIC_LIB@ + /* Defined if HDF5 CPP was built with CMake AND build as a shared library */ #cmakedefine H5_CPP_BUILT_AS_DYNAMIC_LIB @H5_CPP_BUILT_AS_DYNAMIC_LIB@ +/* Defined if HDF5 CPP was built with CMake AND build as a static library */ +#cmakedefine H5_CPP_BUILT_AS_STATIC_LIB @H5_CPP_BUILT_AS_STATIC_LIB@ + /* Defined if HDF5 HL was built with CMake AND build as a shared library */ #cmakedefine H5_HL_BUILT_AS_DYNAMIC_LIB @H5_HL_BUILT_AS_DYNAMIC_LIB@ +/* Defined if HDF5 HL was built with CMake AND build as a static library */ +#cmakedefine H5_HL_BUILT_AS_STATIC_LIB @H5_HL_BUILT_AS_STATIC_LIB@ + /* Define if building universal (internal helper macro) */ #cmakedefine H5_AC_APPLE_UNIVERSAL_BUILD @H5_AC_APPLE_UNIVERSAL_BUILD@ diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index 6146e66..5e41f35 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -127,21 +127,6 @@ 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" - LINK_FLAGS_DEBUG "/NODEFAULTLIB:MSVCRTD" - ) - 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) @@ -152,14 +137,6 @@ MACRO (TARGET_FORTRAN_WIN_PROPERTIES target) LINK_FLAGS "/SUBSYSTEM:CONSOLE" ) ENDIF (MSVC) - ELSE (BUILD_SHARED_LIBS) - IF (MSVC) - SET_TARGET_PROPERTIES (${target} - PROPERTIES - LINK_FLAGS "/NODEFAULTLIB:MSVCRT" - LINK_FLAGS_DEBUG "/NODEFAULTLIB:MSVCRTD" - ) - ENDIF (MSVC) ENDIF (BUILD_SHARED_LIBS) ENDIF (WIN32) ENDMACRO (TARGET_FORTRAN_WIN_PROPERTIES) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 4ea3f86..aadc74d 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -25,7 +25,6 @@ SET (examples FOREACH (example ${examples}) ADD_EXECUTABLE (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c) H5_NAMING (${example}) - TARGET_WIN_PROPERTIES (${example}) TARGET_LINK_LIBRARIES (${example} ${HDF5_LIB_TARGET}) IF (BUILD_TESTING) @@ -40,7 +39,6 @@ ENDIF (BUILD_TESTING) IF (H5_HAVE_PARALLEL) ADD_EXECUTABLE (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c) H5_NAMING (ph5example) - TARGET_WIN_PROPERTIES (ph5example) TARGET_LINK_LIBRARIES (ph5example ${HDF5_LIB_TARGET}) IF (BUILD_TESTING) diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt index 1e9682c..c445ae8 100644 --- a/hl/c++/examples/CMakeLists.txt +++ b/hl/c++/examples/CMakeLists.txt @@ -12,7 +12,6 @@ INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_DIR}/src) # -------------------------------------------------------------------- ADD_EXECUTABLE (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp) H5_NAMING (ptExampleFL) -TARGET_WIN_PROPERTIES (ptExampleFL) TARGET_LINK_LIBRARIES ( ptExampleFL ${HDF5_HL_CPP_LIB_TARGET} @@ -22,7 +21,6 @@ TARGET_LINK_LIBRARIES ( ADD_EXECUTABLE (ptExampleVL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleVL.cpp) H5_NAMING (ptExampleVL) -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 cf621a2..9e4b064 100644 --- a/hl/c++/test/CMakeLists.txt +++ b/hl/c++/test/CMakeLists.txt @@ -18,7 +18,6 @@ IF (BUILD_TESTING) ADD_EXECUTABLE (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp) H5_NAMING (hl_ptableTest) - 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 b229aa9..1c7fff6 100644 --- a/hl/examples/CMakeLists.txt +++ b/hl/examples/CMakeLists.txt @@ -44,7 +44,6 @@ SET (examples FOREACH (example ${examples}) ADD_EXECUTABLE (hl_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.c) H5_NAMING (hl_ex_${example}) - TARGET_WIN_PROPERTIES (hl_ex_${example}) TARGET_LINK_LIBRARIES (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) IF (BUILD_TESTING) diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt index 22568ae..0f1cbf1 100644 --- a/hl/test/CMakeLists.txt +++ b/hl/test/CMakeLists.txt @@ -23,7 +23,6 @@ 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}) - TARGET_WIN_PROPERTIES (hl_${hl_name}) TARGET_LINK_LIBRARIES (hl_${hl_name} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} @@ -88,7 +87,6 @@ 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) - 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 8ed3fab..2399335 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -19,7 +19,6 @@ INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5) ADD_EXECUTABLE (gif2h5 ${GIF2H5_SRCS}) H5_NAMING (gif2h5) -TARGET_WIN_PROPERTIES (gif2h5) TARGET_LINK_LIBRARIES (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) #-- Add h52gif program @@ -29,7 +28,6 @@ SET (hdf2gif_SRCS ) ADD_EXECUTABLE (hdf2gif ${hdf2gif_SRCS}) H5_NAMING (hdf2gif) -TARGET_WIN_PROPERTIES (hdf2gif) TARGET_LINK_LIBRARIES (hdf2gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) # -------------------------------------------------------------------- @@ -40,7 +38,6 @@ 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) - TARGET_WIN_PROPERTIES (hl_h52gifgentest) TARGET_LINK_LIBRARIES (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) # ADD_TEST (NAME hl_h52gifgentest COMMAND $) diff --git a/perform/CMakeLists.txt b/perform/CMakeLists.txt index fc1d252..5b74bc0 100644 --- a/perform/CMakeLists.txt +++ b/perform/CMakeLists.txt @@ -34,7 +34,6 @@ SET (h5perf_serial_SRCS ) ADD_EXECUTABLE (h5perf_serial ${h5perf_serial_SRCS}) H5_NAMING (h5perf_serial) -TARGET_WIN_PROPERTIES (h5perf_serial) TARGET_LINK_LIBRARIES (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) ADD_TEST (NAME h5perf_serial COMMAND $) @@ -51,7 +50,6 @@ IF (HDF5_BUILD_PERFORM_STANDALONE) APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE ) H5_NAMING (h5perf_serial_alone) - TARGET_WIN_PROPERTIES (h5perf_serial_alone) TARGET_LINK_LIBRARIES (h5perf_serial_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) ADD_TEST (NAME h5perf_serial_alone COMMAND $) @@ -63,7 +61,6 @@ SET (chunk_SRCS ) ADD_EXECUTABLE(chunk ${chunk_SRCS}) H5_NAMING (chunk) -TARGET_WIN_PROPERTIES (chunk) TARGET_LINK_LIBRARIES(chunk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) ADD_TEST (NAME chunk COMMAND $) @@ -74,7 +71,6 @@ SET (iopipe_SRCS ) ADD_EXECUTABLE (iopipe ${iopipe_SRCS}) H5_NAMING (iopipe) -TARGET_WIN_PROPERTIES (iopipe) TARGET_LINK_LIBRARIES (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) ADD_TEST (NAME iopipe COMMAND $) @@ -85,7 +81,6 @@ SET (overhead_SRCS ) ADD_EXECUTABLE (overhead ${overhead_SRCS}) H5_NAMING (overhead) -TARGET_WIN_PROPERTIES (overhead) TARGET_LINK_LIBRARIES (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) ADD_TEST (NAME overhead COMMAND $) @@ -96,7 +91,6 @@ SET (perf_meta_SRCS ) ADD_EXECUTABLE (perf_meta ${perf_meta_SRCS}) H5_NAMING (perf_meta) -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 $) @@ -107,7 +101,6 @@ SET (zip_perf_SRCS ) ADD_EXECUTABLE (zip_perf ${zip_perf_SRCS}) H5_NAMING (zip_perf) -TARGET_WIN_PROPERTIES (zip_perf) TARGET_LINK_LIBRARIES (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) ADD_TEST (NAME zip_perf COMMAND $ "-h") @@ -121,7 +114,6 @@ IF (H5_HAVE_PARALLEL) ) ADD_EXECUTABLE (h5perf ${h5perf_SRCS}) H5_NAMING (h5perf) - TARGET_WIN_PROPERTIES (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} $) @@ -138,7 +130,6 @@ IF (H5_HAVE_PARALLEL) APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE ) H5_NAMING (h5perf_alone) - TARGET_WIN_PROPERTIES (h5perf_alone) TARGET_LINK_LIBRARIES (h5perf_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) ADD_TEST (NAME h5perf_alone COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) @@ -150,7 +141,6 @@ IF (H5_HAVE_PARALLEL) ) ADD_EXECUTABLE (benchpar ${benchpar_SRCS}) H5_NAMING (benchpar) - 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} $) @@ -161,7 +151,6 @@ IF (H5_HAVE_PARALLEL) ) ADD_EXECUTABLE (mpi-perf ${mpi-perf_SRCS}) H5_NAMING (mpi-perf) - 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} $) diff --git a/src/H5api_adpt.h b/src/H5api_adpt.h index c324f08..6e02e28 100644 --- a/src/H5api_adpt.h +++ b/src/H5api_adpt.h @@ -281,6 +281,22 @@ #define HDF5_HL_F90CSTUBDLLVAR extern #endif /* HDF5_HL_F90CSTUBDLL */ +#elif (H5_BUILT_AS_STATIC_LIB) + #define H5_DLL + #define H5_HLDLL + #define H5_HLCPPDLL + #define HDF5_HL_F90CSTUBDLL + #define H5_DLLVAR extern + #define H5_DLLCPP + #define H5TEST_DLL + #define H5TEST_DLLVAR extern + #define H5TOOLS_DLL + #define H5TOOLS_DLLVAR extern + #define H5_FCDLL + #define H5_FCDLLVAR extern + #define H5_FCTESTDLL + #define H5_FCTESTDLLVAR extern + #else /* This is the original HDFGroup defined preprocessor code which should still work * with the VS projects that are maintained by "The HDF Group" diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5c3a9d0..34d7b29 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -147,7 +147,6 @@ SET (testhdf5_SRCS #-- Adding test for testhdf5 ADD_EXECUTABLE (testhdf5 ${testhdf5_SRCS}) H5_NAMING (testhdf5) -TARGET_WIN_PROPERTIES (testhdf5) TARGET_LINK_LIBRARIES (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) ADD_TEST (NAME testhdf5 COMMAND $) @@ -161,7 +160,6 @@ ADD_TEST (NAME testhdf5 COMMAND $) MACRO (ADD_H5_TEST file) ADD_EXECUTABLE (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) H5_NAMING (${file}) - TARGET_WIN_PROPERTIES (${file}) TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) ADD_TEST (NAME ${file} COMMAND $) @@ -305,7 +303,6 @@ ENDFOREACH (test ${H5_TESTS}) #-- Adding test for cache ADD_EXECUTABLE (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) H5_NAMING (cache) -TARGET_WIN_PROPERTIES (cache) TARGET_LINK_LIBRARIES (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) ADD_TEST (NAME cache COMMAND $) @@ -313,7 +310,6 @@ ADD_TEST (NAME cache COMMAND $) #-- 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) -TARGET_WIN_PROPERTIES (cache_api) TARGET_LINK_LIBRARIES (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) ADD_TEST (NAME cache_api COMMAND $) @@ -321,7 +317,6 @@ ADD_TEST (NAME cache_api COMMAND $) #-- 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) -TARGET_WIN_PROPERTIES (cache_tagging) TARGET_LINK_LIBRARIES (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) ADD_TEST (NAME cache_tagging COMMAND $) @@ -334,7 +329,6 @@ ADD_EXECUTABLE (ttsafe ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c ) H5_NAMING (ttsafe) -TARGET_WIN_PROPERTIES (ttsafe) TARGET_LINK_LIBRARIES (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) ADD_TEST (NAME ttsafe COMMAND $) @@ -343,7 +337,6 @@ ADD_TEST (NAME ttsafe COMMAND $) IF (HDF5_ENABLE_DEPRECATED_SYMBOLS) ADD_EXECUTABLE (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c) H5_NAMING (err_compat) - TARGET_WIN_PROPERTIES (err_compat) TARGET_LINK_LIBRARIES (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) ADD_TEST (NAME err_compat COMMAND "${CMAKE_COMMAND}" @@ -361,7 +354,6 @@ ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS) #-- Adding test for error_test ADD_EXECUTABLE (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c) H5_NAMING (error_test) -TARGET_WIN_PROPERTIES (error_test) TARGET_LINK_LIBRARIES (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) ADD_TEST (NAME error_test COMMAND "${CMAKE_COMMAND}" @@ -378,7 +370,6 @@ ADD_TEST (NAME error_test COMMAND "${CMAKE_COMMAND}" #-- Adding test for links_env ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c) H5_NAMING (links_env) -TARGET_WIN_PROPERTIES (links_env) TARGET_LINK_LIBRARIES (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) ADD_TEST (NAME links_env COMMAND "${CMAKE_COMMAND}" @@ -507,7 +498,6 @@ 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}) - 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 e019689..554efb9 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -23,7 +23,6 @@ SET (testphdf5_SRCS #-- Adding test for testhdf5 ADD_EXECUTABLE (testphdf5 ${testphdf5_SRCS}) H5_NAMING (testphdf5) -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} $) @@ -31,7 +30,6 @@ 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}) - 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} $) diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index afb1ca7..affaf66 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -12,7 +12,6 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test) # -------------------------------------------------------------------- ADD_EXECUTABLE (h5copy ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c) H5_NAMING (h5copy) -TARGET_WIN_PROPERTIES (h5copy) TARGET_LINK_LIBRARIES (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) SET (H5_DEP_EXECUTABLES h5copy) @@ -27,7 +26,6 @@ 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) - TARGET_WIN_PROPERTIES (h5copygentest) TARGET_LINK_LIBRARIES (h5copygentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) #ADD_TEST (NAME h5copygentest COMMAND $) diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt index 4ad17de..5517fca 100644 --- a/tools/h5diff/CMakeLists.txt +++ b/tools/h5diff/CMakeLists.txt @@ -15,7 +15,6 @@ ADD_EXECUTABLE (h5diff ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_main.c ) H5_NAMING (h5diff) -TARGET_WIN_PROPERTIES (h5diff) TARGET_LINK_LIBRARIES (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) SET (H5_DEP_EXECUTABLES h5diff) @@ -33,7 +32,6 @@ 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) - TARGET_WIN_PROPERTIES (h5diffgentest) TARGET_LINK_LIBRARIES (h5diffgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) #ADD_TEST (NAME h5diffgentest COMMAND $) diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index f89011c..afff175 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -12,7 +12,6 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test) # -------------------------------------------------------------------- ADD_EXECUTABLE (h5dump ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump.c) H5_NAMING (h5dump) -TARGET_WIN_PROPERTIES (h5dump) TARGET_LINK_LIBRARIES (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) SET (H5_DEP_EXECUTABLES h5dump) @@ -30,7 +29,6 @@ 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) - TARGET_WIN_PROPERTIES (h5dumpgentest) TARGET_LINK_LIBRARIES (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) #ADD_TEST (NAME h5dumpgentest COMMAND $) diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index e2015dc..a92ea4e 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -12,7 +12,6 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test) # -------------------------------------------------------------------- ADD_EXECUTABLE (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c) H5_NAMING (h5import) -TARGET_WIN_PROPERTIES (h5import) TARGET_LINK_LIBRARIES (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) SET (H5_DEP_EXECUTABLES h5import) @@ -29,7 +28,6 @@ IF (BUILD_TESTING) # -------------------------------------------------------------------- ADD_EXECUTABLE (h5importtest ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5importtest.c) H5_NAMING (h5importtest) - 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 69b3e75..0896363 100644 --- a/tools/h5jam/CMakeLists.txt +++ b/tools/h5jam/CMakeLists.txt @@ -12,22 +12,18 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test) # -------------------------------------------------------------------- ADD_EXECUTABLE (h5jam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jam.c) H5_NAMING (h5jam) -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) -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) -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) -TARGET_WIN_PROPERTIES (h5unjam) TARGET_LINK_LIBRARIES (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) SET (H5_DEP_EXECUTABLES @@ -50,7 +46,6 @@ 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) - TARGET_WIN_PROPERTIES (h5jamgentest) TARGET_LINK_LIBRARIES (h5jamgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) #ADD_TEST (NAME h5jamgentest COMMAND $) diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index 0e38fc2..0734382 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -12,7 +12,6 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test) #----------------------------------------------------------------------------- ADD_EXECUTABLE (h5ls ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c) H5_NAMING (h5ls) -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 56029fd..a43de12 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -22,7 +22,6 @@ SET (REPACK_COMMON_SRCS ADD_EXECUTABLE (h5repack ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c) H5_NAMING (h5repack) -TARGET_WIN_PROPERTIES (h5repack) TARGET_LINK_LIBRARIES (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) SET (H5_DEP_EXECUTABLES h5repack) @@ -39,7 +38,6 @@ IF (BUILD_TESTING) # -------------------------------------------------------------------- ADD_EXECUTABLE (testh5repack_detect_szip ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c) H5_NAMING (testh5repack_detect_szip) - 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 $) @@ -58,7 +56,6 @@ IF (BUILD_TESTING) ADD_EXECUTABLE (h5repacktest ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repacktst.c) H5_NAMING (h5repacktest) - TARGET_WIN_PROPERTIES (h5repacktest) TARGET_LINK_LIBRARIES (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) ADD_TEST (NAME h5repacktest COMMAND $) diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index e00d8ae..60dfeb3 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -12,7 +12,6 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test) # -------------------------------------------------------------------- ADD_EXECUTABLE (h5stat ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c) H5_NAMING (h5stat) -TARGET_WIN_PROPERTIES (h5stat) TARGET_LINK_LIBRARIES (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) SET (H5_DEP_EXECUTABLES h5stat) @@ -30,7 +29,6 @@ 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) - TARGET_WIN_PROPERTIES (h5stat_gentest) TARGET_LINK_LIBRARIES (h5stat_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) #ADD_TEST (NAME h5stat_gentest COMMAND $) diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index d909795..b713c4d 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -13,17 +13,14 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test) #-- Misc Executables ADD_EXECUTABLE (h5debug ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5debug.c) H5_NAMING (h5debug) -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) -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) -TARGET_WIN_PROPERTIES (h5mkgrp) TARGET_LINK_LIBRARIES (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) SET (H5_DEP_EXECUTABLES @@ -45,14 +42,12 @@ 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) - TARGET_WIN_PROPERTIES (h5repart_gentest) TARGET_LINK_LIBRARIES (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) #ADD_TEST (NAME h5repart_gentest COMMAND $) 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) - TARGET_WIN_PROPERTIES (h5repart_test) TARGET_LINK_LIBRARIES (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) # -------------------------------------------------------------------- -- cgit v0.12