Skip to content

Commit 6876221

Browse files
authored
Remove optimization level limit for flang again and add -fno-unroll-loops for AOCC flang 2.x instead
1 parent 79cdcde commit 6876221

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cmake/system.cmake

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -419,10 +419,9 @@ endif ()
419419

420420
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
421421
if ("${F_COMPILER}" STREQUAL "FLANG")
422-
set(FILTER_FLAGS "-O2;-O3")
423-
foreach (FILTER_FLAG ${FILTER_FLAGS})
424-
string(REPLACE ${FILTER_FLAG} "-O1" CMAKE_Fortran_FLAGS_RELEASE ${CMAKE_Fortran_FLAGS_RELEASE})
425-
endforeach ()
422+
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS_EQUAL 3)
423+
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fno-unroll-loops")
424+
endif ()
426425
endif ()
427426
endif ()
428427

0 commit comments

Comments
 (0)