summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/examples/CMakeLists.txt7
-rw-r--r--fortran/test/CMakeLists.txt20
2 files changed, 27 insertions, 0 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 00b76a4..f8a453e 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -47,6 +47,13 @@ FOREACH (example ${examples})
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
)
ENDIF (MSVC)
+ ELSE (BUILD_SHARED_LIBS)
+ IF (MSVC)
+ SET_TARGET_PROPERTIES (f90_ex_${example}
+ PROPERTIES
+ LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
+ )
+ ENDIF (MSVC)
ENDIF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET f90_ex_${example}
APPEND PROPERTY COMPILE_DEFINITIONS
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index ec75c95..7875f97 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -89,6 +89,11 @@ IF (WIN32)
COMPILE_FLAGS "/dll"
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
)
+ ELSE (BUILD_SHARED_LIBS)
+ SET_TARGET_PROPERTIES (testhdf5_fortran
+ PROPERTIES
+ LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
+ )
ENDIF (BUILD_SHARED_LIBS)
ENDIF (MSVC)
ENDIF (WIN32)
@@ -119,6 +124,11 @@ IF (WIN32)
COMPILE_FLAGS "/dll"
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
)
+ ELSE (BUILD_SHARED_LIBS)
+ SET_TARGET_PROPERTIES (testhdf5_fortran_1_8
+ PROPERTIES
+ LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
+ )
ENDIF (BUILD_SHARED_LIBS)
ENDIF (MSVC)
ENDIF (WIN32)
@@ -143,6 +153,11 @@ IF (WIN32)
COMPILE_FLAGS "/dll"
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
)
+ ELSE (BUILD_SHARED_LIBS)
+ SET_TARGET_PROPERTIES (fflush1
+ PROPERTIES
+ LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
+ )
ENDIF (BUILD_SHARED_LIBS)
ENDIF (MSVC)
ENDIF (WIN32)
@@ -167,6 +182,11 @@ IF (WIN32)
COMPILE_FLAGS "/dll"
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
)
+ ELSE (BUILD_SHARED_LIBS)
+ SET_TARGET_PROPERTIES (fflush2
+ PROPERTIES
+ LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
+ )
ENDIF (BUILD_SHARED_LIBS)
ENDIF (MSVC)
ENDIF (WIN32)