Skip to content

Commit

Permalink
Don't use OpenMP with LLVM Flang before version 17.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuetzel committed Sep 25, 2023
1 parent 3f86013 commit d21c660
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 @@ -115,6 +115,14 @@ if (NOT NOFORTRAN AND CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
endif()
set(NO_AVX512 1)
endif()

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

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

0 comments on commit d21c660

Please sign in to comment.