summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-07-18 15:45:42 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-07-18 15:45:42 (GMT)
commitbdfb553c4c5783f757524f436ae8043e061dd765 (patch)
tree6af16b6b2cbfd918f241b54bfc51f48a38220c1b /c++
parent17474a232fa0bd2a7fb8da8e9e97d9050cbc0443 (diff)
downloadhdf5-bdfb553c4c5783f757524f436ae8043e061dd765.zip
hdf5-bdfb553c4c5783f757524f436ae8043e061dd765.tar.gz
hdf5-bdfb553c4c5783f757524f436ae8043e061dd765.tar.bz2
HDFFV-1045 gcc static must be link flags
Diffstat (limited to 'c++')
-rw-r--r--c++/src/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 0871123..f3db4f2 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -114,8 +114,12 @@ if (BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_CPP_LIBSH_TARGET}
PUBLIC ${HDF5_LIBSH_TARGET}
- PRIVATE "$<$<PLATFORM_ID:MinGW>:-static -static-libgcc -static-libstdc++ -dynamic>"
)
+ if (MINGW)
+ target_link_options (${HDF5_CPP_LIBSH_TARGET}
+ PUBLIC "-static -static-libgcc -static-libstdc++ -dynamic>"
+ )
+ endif ()
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_CPP_LIBSH_TARGET} ${HDF5_CPP_LIB_NAME} SHARED "CXX")
set_target_properties (${HDF5_CPP_LIBSH_TARGET} PROPERTIES FOLDER libraries/cpp)