diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-01-05 14:46:08 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-01-05 14:46:08 (GMT) |
commit | 02888be7f2b3ec1c5d8c388dd3873645020d1e48 (patch) | |
tree | c23820fc51972c057ebffcb8440d68f7986a2b94 | |
parent | 9449cfa3615eadb40d554a1148ca020ac1b0f632 (diff) | |
download | hdf5-02888be7f2b3ec1c5d8c388dd3873645020d1e48.zip hdf5-02888be7f2b3ec1c5d8c388dd3873645020d1e48.tar.gz hdf5-02888be7f2b3ec1c5d8c388dd3873645020d1e48.tar.bz2 |
[svn-r19909] Change how LINK_FLAGS for fortran are appended on Windows
bring r19908 from 1.8 branch
-rw-r--r-- | config/cmake/HDF5Macros.cmake | 4 | ||||
-rw-r--r-- | fortran/examples/CMakeLists.txt | 4 | ||||
-rw-r--r-- | fortran/src/CMakeLists.txt | 8 | ||||
-rw-r--r-- | fortran/test/CMakeLists.txt | 10 | ||||
-rw-r--r-- | fortran/testpar/CMakeLists.txt | 2 | ||||
-rw-r--r-- | hl/fortran/examples/CMakeLists.txt | 2 | ||||
-rw-r--r-- | hl/fortran/src/CMakeLists.txt | 8 | ||||
-rw-r--r-- | hl/fortran/test/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tools/lib/CMakeLists.txt | 1 |
9 files changed, 16 insertions, 29 deletions
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index 808f7c4..20b5933 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -127,13 +127,13 @@ MACRO (H5_SET_LIB_OPTIONS libtarget libname libtype) ENDMACRO (H5_SET_LIB_OPTIONS) #------------------------------------------------------------------------------- -MACRO (TARGET_FORTRAN_WIN_PROPERTIES target) +MACRO (TARGET_FORTRAN_WIN_PROPERTIES target add_link_flags) IF (WIN32) IF (MSVC) SET_TARGET_PROPERTIES (${target} PROPERTIES COMPILE_FLAGS "/dll" - LINK_FLAGS "/SUBSYSTEM:CONSOLE" + LINK_FLAGS "/SUBSYSTEM:CONSOLE ${add_link_flags}" ) ENDIF (MSVC) ENDIF (WIN32) diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index b0c46c5..c0ddf32 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -38,7 +38,7 @@ SET (examples FOREACH (example ${examples}) ADD_EXECUTABLE (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) H5_NAMING (f90_ex_${example} ${LIB_TYPE}) - TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_${example}) + TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_${example} "") IF (WIN32 AND NOT CYGWIN) SET_PROPERTY (TARGET f90_ex_${example} APPEND PROPERTY COMPILE_DEFINITIONS @@ -60,7 +60,7 @@ ENDFOREACH (example ${examples}) IF (H5_HAVE_PARALLEL) ADD_EXECUTABLE (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) H5_NAMING (f90_ex_ph5example ${LIB_TYPE}) - TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_ph5example) + TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_ph5example "") IF (WIN32 AND NOT CYGWIN) SET_PROPERTY (TARGET f90_ex_ph5example APPEND PROPERTY COMPILE_DEFINITIONS diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 8ad5000..9da2af7 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -184,19 +184,13 @@ ENDIF (H5_HAVE_PARALLEL) # Add Main fortran library #----------------------------------------------------------------------------- ADD_LIBRARY (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} ${f90_F_SRCS}) -TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_LIB_TARGET}) +TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_LIB_TARGET} "/DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def") IF (WIN32 AND NOT CYGWIN) IF (BUILD_SHARED_LIBS) SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS BUILD_HDF5_DLL ) - IF (MSVC) - SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET} - APPEND PROPERTY LINK_FLAGS - "/DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def" - ) - ENDIF (MSVC) ENDIF (BUILD_SHARED_LIBS) SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index f69753b..775e5c5 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -30,7 +30,7 @@ ADD_LIBRARY (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.f90) ADD_DEPENDENCIES(${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_TARGET} ) -TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET}) +TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} "/DLL") IF (WIN32 AND NOT CYGWIN) IF (BUILD_SHARED_LIBS) SET_PROPERTY (TARGET ${HDF5_F90_TEST_LIB_TARGET} @@ -75,7 +75,7 @@ ADD_EXECUTABLE (testhdf5_fortran tH5Z.f90 ) H5_NAMING (testhdf5_fortran ${LIB_TYPE}) -TARGET_FORTRAN_WIN_PROPERTIES (testhdf5_fortran) +TARGET_FORTRAN_WIN_PROPERTIES (testhdf5_fortran "") TARGET_LINK_LIBRARIES (testhdf5_fortran ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} @@ -97,7 +97,7 @@ ADD_EXECUTABLE (testhdf5_fortran_1_8 tH5G_1_8.f90 ) H5_NAMING (testhdf5_fortran_1_8 ${LIB_TYPE}) -TARGET_FORTRAN_WIN_PROPERTIES (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} @@ -113,7 +113,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 ${LIB_TYPE}) -TARGET_FORTRAN_WIN_PROPERTIES (fflush1) +TARGET_FORTRAN_WIN_PROPERTIES (fflush1 "") TARGET_LINK_LIBRARIES (fflush1 ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} @@ -129,7 +129,7 @@ ADD_TEST (NAME fflush1 COMMAND $<TARGET_FILE:fflush1>) #-- Adding test for fflush2 ADD_EXECUTABLE (fflush2 fflush2.f90) H5_NAMING (fflush2 ${LIB_TYPE}) -TARGET_FORTRAN_WIN_PROPERTIES (fflush2) +TARGET_FORTRAN_WIN_PROPERTIES (fflush2 "") TARGET_LINK_LIBRARIES (fflush2 ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index 0a2062d..9cfbae5 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -22,7 +22,7 @@ ADD_EXECUTABLE (parallel_test mdset.f90 ) H5_NAMING (parallel_test ${LIB_TYPE}) -TARGET_FORTRAN_WIN_PROPERTIES (parallel_test) +TARGET_FORTRAN_WIN_PROPERTIES (parallel_test "") TARGET_LINK_LIBRARIES (parallel_test ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt index 8480bf2..698407d 100644 --- a/hl/fortran/examples/CMakeLists.txt +++ b/hl/fortran/examples/CMakeLists.txt @@ -19,7 +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} ${LIB_TYPE}) - TARGET_FORTRAN_WIN_PROPERTIES (hl_f90_ex_${example}) + 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/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 6a40a8f..77b73d2 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -51,19 +51,13 @@ SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} ${LIB_TYPE}) ADD_LIBRARY (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS}) -TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET}) +TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} "/DLL") IF (BUILD_SHARED_LIBS) IF (WIN32 AND NOT CYGWIN) SET_PROPERTY (TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS BUILD_HDF5_DLL ) - IF (MSVC) - SET_PROPERTY (TARGET ${HDF5_HL_F90_LIB_TARGET} - APPEND PROPERTY LINK_FLAGS - "/DLL" - ) - ENDIF (MSVC) ENDIF (WIN32 AND NOT CYGWIN) ENDIF (BUILD_SHARED_LIBS) IF (WIN32 AND NOT CYGWIN) diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index f265e86..280089a 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -29,7 +29,7 @@ ADD_TEST ( #-- Adding test for hl_f90_tstlite ADD_EXECUTABLE (hl_f90_tstlite tstlite.f90) H5_NAMING (hl_f90_tstlite ${LIB_TYPE}) -TARGET_FORTRAN_WIN_PROPERTIES (hl_f90_tstlite) +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) @@ -38,7 +38,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 ${LIB_TYPE}) -TARGET_FORTRAN_WIN_PROPERTIES (hl_f90_tstimage) +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) @@ -47,7 +47,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 ${LIB_TYPE}) -TARGET_FORTRAN_WIN_PROPERTIES (hl_f90_tsttable) +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/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index 879e30e..c3662f6 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -31,7 +31,6 @@ SET (H5_TOOLS_LIB_HDRS ${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.h ) -#-- Always build a static library for linking the ${HDF5_LIB_NAME} tools together ADD_LIBRARY (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS}) TARGET_LINK_LIBRARIES (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) SET_GLOBAL_VARIABLE( HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}") |