summaryrefslogtreecommitdiffstats
path: root/c++/src/CMakeLists.txt
diff options
context:
space:
mode:
authorMichel Zou <xantares09@hotmail.com>2020-10-30 09:44:24 (GMT)
committerMichel Zou <xantares09@hotmail.com>2020-10-31 09:31:38 (GMT)
commit7259b5eb7ac291f00cc989a44c5fe4964759efaf (patch)
tree805715ed48133b0127a15185f85b5f74f42d364d /c++/src/CMakeLists.txt
parentd8b7b3593b0727acade59ebddf4c749ea774ae2a (diff)
downloadhdf5-7259b5eb7ac291f00cc989a44c5fe4964759efaf.zip
hdf5-7259b5eb7ac291f00cc989a44c5fe4964759efaf.tar.gz
hdf5-7259b5eb7ac291f00cc989a44c5fe4964759efaf.tar.bz2
CMake: Add an option to opt-out static libgcc
With sjlj exception model, statically link to libgcc/libstdc++ prevents exceptions to be caught from other dynamic libraries.
Diffstat (limited to 'c++/src/CMakeLists.txt')
-rw-r--r--c++/src/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 04822cf..de2306e 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -117,7 +117,7 @@ if (BUILD_SHARED_LIBS)
target_link_libraries (${HDF5_CPP_LIBSH_TARGET}
PUBLIC ${HDF5_LIBSH_TARGET}
)
- if (MINGW)
+ if (MINGW AND HDF5_MINGW_STATIC_GCC_LIBS)
target_link_options (${HDF5_CPP_LIBSH_TARGET}
PRIVATE -static-libgcc -static-libstdc++
)