From 2859be7575ae1eaac966a73a1ca2d92b77d3e877 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 12 Nov 2023 16:53:44 +0100 Subject: FindOpenMP: Add support for openmp 5.1 (llvm 17) and 5.2 llvm 17 now defaults to openmp 5.1; see LLVM commit `0c6f2f629cc0`. It makes FindOpenMP set OPENMP_FOUND and OpenMP_C_SPEC_DATE, but not OpenMP_C_VERSION, because it doesn't know the version mapping. Add the spec date to the version mapping for 5.1 and 5.2 to make things work again. --- Modules/FindOpenMP.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index cd912c3..1d0f34b 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -434,6 +434,8 @@ endfunction() macro(_OPENMP_SET_VERSION_BY_SPEC_DATE LANG) set(OpenMP_SPEC_DATE_MAP + "202111=5.2" + "202011=5.1" # Preview versions "201611=5.0" # OpenMP 5.0 preview 1 # Combined versions, 2.5 onwards -- cgit v0.12