mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-19 16:50:46 +08:00
HDFFV-10845 make flags private
This commit is contained in:
parent
4d3f52ac97
commit
367f7ed0e3
@ -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 ()
|
||||
|
@ -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}")
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user