mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
Behavior:
Modify HDF5UseFortran.cmake to handle cross-compilation by providing default KINDs and sizes when CMAKE_CROSSCOMPILING is true.
Default values for INTEGER and REAL KINDs and their sizes are set when cross-compiling.
Error messages are adjusted to reflect cross-compilation scenarios.
Logic:
Conditional checks added for CMAKE_CROSSCOMPILING to determine if default values should be used.
Default values include INTEGER KINDs {1,2,4,8,16} and REAL KINDs {4,8,10,16}.
Default sizes for native kinds are set to 4 for INTEGER and REAL, and 8 for DOUBLE PRECISION when cross-compiling.
Misc:
Adjustments to verbose messages to indicate when defaults are used during cross-compilation.
16 lines
341 B
CMake
16 lines
341 B
CMake
# Uncomment the following to use cross-compiling
|
|
#set(CMAKE_SYSTEM_NAME Linux)
|
|
|
|
set(CMAKE_COMPILER_VENDOR "intel")
|
|
|
|
set(CMAKE_C_COMPILER icx)
|
|
if(WIN32)
|
|
set(CMAKE_CXX_COMPILER icx)
|
|
else()
|
|
set(CMAKE_CXX_COMPILER icpx)
|
|
endif()
|
|
set(CMAKE_Fortran_COMPILER ifx)
|
|
|
|
# the following is used if cross-compiling
|
|
set(CMAKE_CROSSCOMPILING_EMULATOR "")
|