@@ -21,7 +21,15 @@ endif()
2121# Other files expect CORE, which is actually TARGET and will become TARGET_CORE for kernel build. Confused yet? 
2222# It seems we are meant to use TARGET as input and CORE internally as kernel. 
2323if (NOT  DEFINED  CORE AND  DEFINED  TARGET )
24-   set (CORE ${TARGET} )
24+   if  (${TARGET}  STREQUAL  "LOONGSON3R5" )
25+     set (CORE "LA464" )
26+   elseif  (${TARGET}  STREQUAL  "LOONGSON2K1000" )
27+     set (CORE "LA264" )
28+   elseif  (${TARGET}  STREQUAL  "LOONGSONGENERIC" )
29+     set (CORE "LA64_GENERIC)" )
30+   else  ()
31+     set (CORE ${TARGET} )
32+   endif ()
2533endif ()
2634
2735# TARGET_CORE will override TARGET which is used in DYNAMIC_ARCH=1. 
@@ -310,6 +318,9 @@ if (${TARGET} STREQUAL NEOVERSEV1)
310318      set  (KERNEL_DEFINITIONS  "${KERNEL_DEFINITIONS}  -march=armv8.2-a+sve" )
311319    endif ()
312320  endif ()
321+   if  (${TARGET}  STREQUAL  ARMV9SME)
322+       set  (KERNEL_DEFINITIONS  "${KERNEL_DEFINITIONS}  -march=armv9-a+sme -O3" )
323+   endif ()
313324  if  (${TARGET}  STREQUAL  A64FX)
314325    if  (${CMAKE_C_COMPILER_ID}  STREQUAL  "PGI"  AND  NOT  NO_SVE)
315326      set  (KERNEL_DEFINITIONS  "${KERNEL_DEFINITIONS}  -Msve-intrinsics -march=armv8.2-a+sve -mtune=a64fx" )
@@ -382,6 +393,8 @@ if (NEED_PIC)
382393  if  (NOT  NOFORTRAN)
383394    if  (${F_COMPILER}  STREQUAL  "SUN" )
384395      set (FCOMMON_OPT "${FCOMMON_OPT}  -pic" )
396+     elseif  (${F_COMPILER}  STREQUAL  "NAGFOR" )
397+       set (FCOMMON_OPT "${FCOMMON_OPT}  -PIC" )
385398    else  ()
386399      set (FCOMMON_OPT "${FCOMMON_OPT}  -fPIC" )
387400    endif  ()
@@ -640,17 +653,17 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
640653endif  ()
641654
642655if  (CMAKE_Fortran_COMPILER)
643- if  ("${F_COMPILER} "  STREQUAL  "NAG"  OR  "${F_COMPILER} "  STREQUAL  "CRAY"  OR  CMAKE_Fortran_COMPILER_ID MATCHES  "LLVMFlang.*" )
644-   set (FILTER_FLAGS "-msse3;-mssse3;-msse4.1;-mavx;-mavx2,-mskylake-avx512" )
645-   if  (CMAKE_Fortran_COMPILER_ID MATCHES  "LLVMFlang.*" )
646- message (STATUS  "removing fortran flags" )
647-     set (FILTER_FLAGS "${FILTER_FLAGS} ;-m32;-m64" )
656+   if  ("${F_COMPILER} "  STREQUAL  "NAGFOR"  OR  "${F_COMPILER} "  STREQUAL  "CRAY"  OR  CMAKE_Fortran_COMPILER_ID MATCHES  "LLVMFlang.*" )
657+     set (FILTER_FLAGS "-msse3;-mssse3;-msse4.1;-mavx;-mavx2,-mskylake-avx512" )
658+     if  (CMAKE_Fortran_COMPILER_ID MATCHES  "LLVMFlang.*" )
659+       message (STATUS  "removing fortran flags" )
660+       set (FILTER_FLAGS "${FILTER_FLAGS} ;-m32;-m64" )
661+     endif  ()
662+     foreach  (FILTER_FLAG ${FILTER_FLAGS} )
663+       string (REPLACE ${FILTER_FLAG}  ""  LAPACK_FFLAGS ${LAPACK_FFLAGS} )
664+       string (REPLACE ${FILTER_FLAG}  ""  LAPACK_FPFLAGS ${LAPACK_FPFLAGS} )
665+     endforeach  ()
648666  endif  ()
649-   foreach  (FILTER_FLAG ${FILTER_FLAGS} )
650-     string (REPLACE ${FILTER_FLAG}  ""  LAPACK_FFLAGS ${LAPACK_FFLAGS} )
651-     string (REPLACE ${FILTER_FLAG}  ""  LAPACK_FPFLAGS ${LAPACK_FPFLAGS} )
652-   endforeach  ()
653- endif  ()
654667endif  ()
655668
656669if  ("${F_COMPILER} "  STREQUAL  "GFORTRAN" )
@@ -670,6 +683,9 @@ endif ()
670683if  (${CMAKE_C_COMPILER}  STREQUAL  "LSB"  OR  ${CMAKE_SYSTEM_NAME}  STREQUAL  "Windows" )
671684  set (LAPACK_CFLAGS "${LAPACK_CFLAGS}  -DLAPACK_COMPLEX_STRUCTURE" )
672685endif  ()
686+ if  (${CMAKE_C_COMPILER_ID}  MATCHES  "IntelLLVM"  AND  ${CMAKE_SYSTEM_NAME}  STREQUAL  "Windows" )
687+ 	set (LAPACK_CFLAGS "${LAPACK_CFLAGS}  -DNOCHANGE" )
688+ endif  ()
673689
674690if  ("${CMAKE_BUILD_TYPE} "  STREQUAL  "Release" )
675691if  ("${F_COMPILER} "  STREQUAL  "FLANG" )
0 commit comments