summaryrefslogtreecommitdiffstats
path: root/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 /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 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d0eebad..dc2cf1a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -578,6 +578,8 @@ if (WIN32 OR MINGW)
add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1 _CRT_SECURE_NO_WARNINGS _CONSOLE)
endif ()
+option (HDF5_MINGW_STATIC_GCC_LIBS "Statically link libgcc/libstdc++" OFF)
+
if (MSVC)
set (CMAKE_MFC_FLAG 0)
set (WIN_COMPILE_FLAGS "")