diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-07-23 21:21:47 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-07-23 21:21:47 (GMT) |
commit | d3fdcd8a680ad0f8b21304b35e8564b774a88ef0 (patch) | |
tree | 7eaf482abb38de0349b7844ed6f9e04de88f438d /c++/examples | |
parent | 6add0919d1dd737a7d9a2da25079d761a85f282e (diff) | |
parent | e19b0302cc38d1850ada7a00431511343cddc8a6 (diff) | |
download | hdf5-d3fdcd8a680ad0f8b21304b35e8564b774a88ef0.zip hdf5-d3fdcd8a680ad0f8b21304b35e8564b774a88ef0.tar.gz hdf5-d3fdcd8a680ad0f8b21304b35e8564b774a88ef0.tar.bz2 |
Merge pull request #1807 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'e19b0302cc38d1850ada7a00431511343cddc8a6': (31 commits)
HDFFV-10845 update note
Correct format of drive check
Use generator expr to get correct name
HDFFV-10845 Allow mingw to find functionality
HDFFV-10845 fix comment syntax
HDFFV-10845 Windows drive can only goto Z
HDFFV-10845 make flags private
Correct java load library name access
Correct syntax
Fix typo
Correct OUTPUT_NAME usage
CMake generator expr cannot be used in get_property cmd
HDFFV-1045 gcc static must be link flags
HDFFV-10845 quote multiple strings in cmake link command
HDFFV-10845 update mingw cmake changes
Add missing target root path, check other export macro
HDFFV-10845 skip test if CMake command doesn't support ignore EOL
HDFFV-10845 copy files with windows EOL
HDFFV-10845 separate test used by copy windows files
HDFFV-10845 mingw needs special windows reference files
...
Diffstat (limited to 'c++/examples')
-rw-r--r-- | c++/examples/CMakeLists.txt | 10 | ||||
-rw-r--r-- | c++/examples/CMakeTests.cmake | 7 |
2 files changed, 15 insertions, 2 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++/examples/CMakeTests.cmake b/c++/examples/CMakeTests.cmake index 58bdb68..b7d7497 100644 --- a/c++/examples/CMakeTests.cmake +++ b/c++/examples/CMakeTests.cmake @@ -26,6 +26,7 @@ SDSextendible.h5 Select.h5 ) + set_tests_properties (CPP_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_cppex) if (last_test) set_tests_properties (CPP_ex-clear-objects PROPERTIES DEPENDS ${last_test}) endif () @@ -33,9 +34,10 @@ foreach (example ${examples}) if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>) + add_test (NAME CPP_ex_${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:cpp_ex_${example}>) else () add_test (NAME CPP_ex_${example} COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:cpp_ex_${example}>" -D "TEST_ARGS:STRING=" -D "TEST_EXPECT=0" @@ -73,9 +75,10 @@ foreach (example ${tutr_examples}) if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>) + add_test (NAME CPP_ex_${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:cpp_ex_${example}>) else () add_test (NAME CPP_ex_${example} COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:cpp_ex_${example}>" -D "TEST_ARGS:STRING=" -D "TEST_EXPECT=0" |