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.
This commit is contained in:
Christoph Reiter 2023-11-12 16:53:44 +01:00 committed by Brad King
parent 257d6766c6
commit 2859be7575

View File

@ -434,6 +434,8 @@ endfunction()
macro(_OPENMP_SET_VERSION_BY_SPEC_DATE LANG) macro(_OPENMP_SET_VERSION_BY_SPEC_DATE LANG)
set(OpenMP_SPEC_DATE_MAP set(OpenMP_SPEC_DATE_MAP
"202111=5.2"
"202011=5.1"
# Preview versions # Preview versions
"201611=5.0" # OpenMP 5.0 preview 1 "201611=5.0" # OpenMP 5.0 preview 1
# Combined versions, 2.5 onwards # Combined versions, 2.5 onwards