Skip to content

Commit

Permalink
Don't use OpenMP with LLVM Flang before version 19.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuetzel committed Nov 17, 2024
1 parent c95ef37 commit d0d3c14
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ if (NOT NOFORTRAN AND CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
endif()
set(NO_AVX512 1)
endif()

if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 19)
# LLVM Flang before version 19 doesn't support necessary OpenMP constructs.
if (USE_OPENMP)
message(STATUS "Disabling OpenMP for LLVM Flang before version 19.")
set(USE_OPENMP 0)
endif()
endif()
endif()

include("${PROJECT_SOURCE_DIR}/cmake/utils.cmake")
Expand Down

0 comments on commit d0d3c14

Please sign in to comment.