diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-01-04 18:40:26 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-01-04 18:40:26 (GMT) |
commit | 9449cfa3615eadb40d554a1148ca020ac1b0f632 (patch) | |
tree | ed9f5207644fcc9ae8b3a828bf104706e1580436 /fortran | |
parent | 1c7688c77afe630fc6382f994671ff3d5220279a (diff) | |
download | hdf5-9449cfa3615eadb40d554a1148ca020ac1b0f632.zip hdf5-9449cfa3615eadb40d554a1148ca020ac1b0f632.tar.gz hdf5-9449cfa3615eadb40d554a1148ca020ac1b0f632.tar.bz2 |
[svn-r19907] Windows: Correct how fortran links in CRT library. Also correct macro use for checking libtype.
bring r19906 from 1.8 branch
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/examples/CMakeLists.txt | 4 | ||||
-rw-r--r-- | fortran/src/CMakeLists.txt | 8 | ||||
-rw-r--r-- | fortran/test/CMakeLists.txt | 16 | ||||
-rw-r--r-- | fortran/testpar/CMakeLists.txt | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index 0b36d03..b0c46c5 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -37,7 +37,7 @@ SET (examples FOREACH (example ${examples}) ADD_EXECUTABLE (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - H5_NAMING (f90_ex_${example}) + H5_NAMING (f90_ex_${example} ${LIB_TYPE}) TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_${example}) IF (WIN32 AND NOT CYGWIN) SET_PROPERTY (TARGET f90_ex_${example} @@ -59,7 +59,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) + H5_NAMING (f90_ex_ph5example ${LIB_TYPE}) TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_ph5example) IF (WIN32 AND NOT CYGWIN) SET_PROPERTY (TARGET f90_ex_ph5example diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 2af57c1..8ad5000 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -184,6 +184,7 @@ 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}) IF (WIN32 AND NOT CYGWIN) IF (BUILD_SHARED_LIBS) SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET} @@ -191,10 +192,9 @@ IF (WIN32 AND NOT CYGWIN) BUILD_HDF5_DLL ) IF (MSVC) - SET_TARGET_PROPERTIES (${HDF5_F90_LIB_TARGET} - PROPERTIES - COMPILE_FLAGS "/dll" - LINK_FLAGS "/SUBSYSTEM:CONSOLE /DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def" + 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) diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index a536c2e..f69753b 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -30,6 +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}) IF (WIN32 AND NOT CYGWIN) IF (BUILD_SHARED_LIBS) SET_PROPERTY (TARGET ${HDF5_F90_TEST_LIB_TARGET} @@ -37,10 +38,9 @@ IF (WIN32 AND NOT CYGWIN) BUILD_HDF5_DLL ) IF (MSVC) - SET_TARGET_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} - PROPERTIES - COMPILE_FLAGS "/dll" - LINK_FLAGS "/SUBSYSTEM:CONSOLE /DLL" + SET_PROPERTY (TARGET ${HDF5_F90_TEST_LIB_TARGET} + APPEND PROPERTY LINK_FLAGS + "/DLL" ) ENDIF (MSVC) ENDIF (BUILD_SHARED_LIBS) @@ -74,7 +74,7 @@ ADD_EXECUTABLE (testhdf5_fortran tH5VL.f90 tH5Z.f90 ) -H5_NAMING (testhdf5_fortran) +H5_NAMING (testhdf5_fortran ${LIB_TYPE}) TARGET_FORTRAN_WIN_PROPERTIES (testhdf5_fortran) TARGET_LINK_LIBRARIES (testhdf5_fortran ${HDF5_F90_TEST_LIB_TARGET} @@ -96,7 +96,7 @@ ADD_EXECUTABLE (testhdf5_fortran_1_8 tH5A_1_8.f90 tH5G_1_8.f90 ) -H5_NAMING (testhdf5_fortran_1_8) +H5_NAMING (testhdf5_fortran_1_8 ${LIB_TYPE}) TARGET_FORTRAN_WIN_PROPERTIES (testhdf5_fortran_1_8) TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8 ${HDF5_F90_TEST_LIB_TARGET} @@ -112,7 +112,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) +H5_NAMING (fflush1 ${LIB_TYPE}) TARGET_FORTRAN_WIN_PROPERTIES (fflush1) TARGET_LINK_LIBRARIES (fflush1 ${HDF5_F90_LIB_TARGET} @@ -128,7 +128,7 @@ ADD_TEST (NAME fflush1 COMMAND $<TARGET_FILE:fflush1>) #-- Adding test for fflush2 ADD_EXECUTABLE (fflush2 fflush2.f90) -H5_NAMING (fflush2) +H5_NAMING (fflush2 ${LIB_TYPE}) TARGET_FORTRAN_WIN_PROPERTIES (fflush2) TARGET_LINK_LIBRARIES (fflush2 ${HDF5_F90_TEST_LIB_TARGET} diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index edabb35..0a2062d 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -21,7 +21,7 @@ ADD_EXECUTABLE (parallel_test hyper.f90 mdset.f90 ) -H5_NAMING (parallel_test) +H5_NAMING (parallel_test ${LIB_TYPE}) TARGET_FORTRAN_WIN_PROPERTIES (parallel_test) TARGET_LINK_LIBRARIES (parallel_test ${HDF5_F90_TEST_LIB_TARGET} |