diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-07-18 21:27:06 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-07-18 21:27:06 (GMT) |
commit | 367f7ed0e338ccf1a698ab0af4bb7ea702fd2d60 (patch) | |
tree | 5b0d32006256cbd858ccbdb6cd90182ed04ff7f6 /c++ | |
parent | 4d3f52ac97ea922cefda857c971fbd3608d8994c (diff) | |
download | hdf5-367f7ed0e338ccf1a698ab0af4bb7ea702fd2d60.zip hdf5-367f7ed0e338ccf1a698ab0af4bb7ea702fd2d60.tar.gz hdf5-367f7ed0e338ccf1a698ab0af4bb7ea702fd2d60.tar.bz2 |
HDFFV-10845 make flags private
Diffstat (limited to 'c++')
-rw-r--r-- | c++/examples/CMakeLists.txt | 10 | ||||
-rw-r--r-- | c++/src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | c++/test/CMakeLists.txt | 5 |
3 files changed, 16 insertions, 1 deletions
diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt index 2088019..58d85c1 100644 --- a/c++/examples/CMakeLists.txt +++ b/c++/examples/CMakeLists.txt @@ -41,6 +41,11 @@ foreach (example ${examples}) else () TARGET_C_PROPERTIES (cpp_ex_${example} SHARED) target_link_libraries (cpp_ex_${example} PRIVATE ${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + if (MINGW) + target_link_options (${HDF5_CPP_LIBSH_TARGET} + PRIVATE -static-libgcc -static-libstdc++ + ) + endif () endif () set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp) endforeach () @@ -54,6 +59,11 @@ foreach (example ${tutr_examples}) else () TARGET_C_PROPERTIES (cpp_ex_${example} SHARED) target_link_libraries (cpp_ex_${example} PRIVATE ${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + if (MINGW) + target_link_options (${HDF5_CPP_LIBSH_TARGET} + PRIVATE -static-libgcc -static-libstdc++ + ) + endif () endif () set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp) endforeach () diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index bb244e8..2a92ed2 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -117,7 +117,7 @@ if (BUILD_SHARED_LIBS) ) if (MINGW) target_link_options (${HDF5_CPP_LIBSH_TARGET} - PUBLIC -static-libgcc -static-libstdc++ + PRIVATE -static-libgcc -static-libstdc++ ) endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIBSH_TARGET}") diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index 95ca9b1..75efc3b 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -48,6 +48,11 @@ if (NOT BUILD_SHARED_LIBS) else () TARGET_C_PROPERTIES (cpp_testhdf5 SHARED) target_link_libraries (cpp_testhdf5 PRIVATE ${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET}) + if (MINGW) + target_link_options (${HDF5_CPP_LIBSH_TARGET} + PRIVATE -static-libgcc -static-libstdc++ + ) + endif () endif () set_target_properties (cpp_testhdf5 PROPERTIES FOLDER test/cpp) |