mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
CMake: Fix Fortran cross-compilation support
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.
This commit is contained in:
@@ -33,7 +33,6 @@ else ()
|
||||
endif ()
|
||||
set_tests_properties (CPP_testhdf5 PROPERTIES
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
ENVIRONMENT "${CROSSCOMPILING_PATH}"
|
||||
)
|
||||
if ("CPP_testhdf5" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
|
||||
set_tests_properties (CPP_testhdf5 PROPERTIES DISABLED true)
|
||||
|
||||
@@ -37,7 +37,6 @@ macro (ADD_VFD_TEST vfdname resultcode)
|
||||
)
|
||||
set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES
|
||||
TIMEOUT ${CTEST_SHORT_TIMEOUT}
|
||||
ENVIRONMENT "${CROSSCOMPILING_PATH}"
|
||||
)
|
||||
if ("CPP_VFD-${vfdname}-cpp_testhdf5" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
|
||||
set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES DISABLED true)
|
||||
|
||||
Reference in New Issue
Block a user