mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
Refactor the cross-compilation infrastructure to rely on the standard
CMAKE_CROSSCOMPILING_EMULATOR variable instead of the custom
CROSSCOMPILING_PATH environment hack.
Key changes:
- Removed `ENVIRONMENT "${CROSSCOMPILING_PATH}"` from all test definitions.
- Updated custom commands (e.g., H5match_types, H5_gen) to invoke the
emulator explicitly when cross-compiling.
- Updated ConfigureChecks.cmake and HDF5UseFortran.cmake to enable
`try_run` checks when an emulator is defined.
- Added config/toolchain/mingw-w64-x86-64-wine.sh wrapper to automatically
locate MinGW runtime libraries (like libgfortran) for Wine execution.
- Cleaned up toolchain files to remove hardcoded emulator paths, deferring
configuration to the build environment.
12 lines
335 B
Bash
Executable File
12 lines
335 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# assume gfortran-mingw-w64-x86-64-win32 is installed
|
|
mingw_prefix=${TOOLCHAIN_PREFIX:-x86_64-w64-mingw32}
|
|
libgfortran_path=`ls /usr/lib/gcc/${mingw_prefix}/*/libgfortran.dll.a 2>/dev/null | head -1`
|
|
if test -n "${libgfortran_path}"; then
|
|
export WINEPATH=`dirname ${libgfortran_path}`
|
|
fi
|
|
/usr/lib/wine/wine64 "$@"
|