File tree 1 file changed +15
-11
lines changed
1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -61,21 +61,25 @@ if (${F_COMPILER} STREQUAL "GFORTRAN" OR ${F_COMPILER} STREQUAL "F95" OR CMAKE_F
61
61
endif ()
62
62
if (LOONGARCH64)
63
63
if (BINARY64)
64
- CHECK_C_COMPILER_FLAG("-mabi=lp64d" COMPILER_SUPPORT_LP64D_ABI)
65
- if (COMPILER_SUPPORT_LP64D_ABI)
66
- set (FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp64d" )
67
- else ()
68
- set (FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp64" )
69
- endif ()
64
+ if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*" )
65
+ CHECK_C_COMPILER_FLAG("-mabi=lp64d" COMPILER_SUPPORT_LP64D_ABI)
66
+ if (COMPILER_SUPPORT_LP64D_ABI)
67
+ set (FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp64d" )
68
+ else ()
69
+ set (FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp64" )
70
+ endif ()
71
+ endif ()
70
72
if (INTERFACE64)
71
73
set (FCOMMON_OPT "${FCOMMON_OPT} -fdefault-integer-8" )
72
74
endif ()
73
75
else ()
74
- CHECK_C_COMPILER_FLAG("-mabi=ilp32d" COMPILER_SUPPORT_ILP32D_ABI)
75
- if (COMPILER_SUPPORT_ILP32D_ABI)
76
- set (FCOMMON_OPT "${FCOMMON_OPT} -mabi=ilp32d" )
77
- else ()
78
- set (FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp32" )
76
+ if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "LLVMFlang.*" )
77
+ CHECK_C_COMPILER_FLAG("-mabi=ilp32d" COMPILER_SUPPORT_ILP32D_ABI)
78
+ if (COMPILER_SUPPORT_ILP32D_ABI)
79
+ set (FCOMMON_OPT "${FCOMMON_OPT} -mabi=ilp32d" )
80
+ else ()
81
+ set (FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp32" )
82
+ endif ()
79
83
endif ()
80
84
endif ()
81
85
endif ()
You can’t perform that action at this time.
0 commit comments