summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2023-11-12 15:53:44 (GMT)
committerBrad King <brad.king@kitware.com>2023-11-13 15:51:40 (GMT)
commit2859be7575ae1eaac966a73a1ca2d92b77d3e877 (patch)
tree0a5829daafc28aa0cb0fd80ee53816595a045965
parent257d6766c634af351a1da994fd163bacfa5bf82b (diff)
downloadCMake-2859be7575ae1eaac966a73a1ca2d92b77d3e877.zip
CMake-2859be7575ae1eaac966a73a1ca2d92b77d3e877.tar.gz
CMake-2859be7575ae1eaac966a73a1ca2d92b77d3e877.tar.bz2
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.
-rw-r--r--Modules/FindOpenMP.cmake2
1 files changed, 2 insertions, 0 deletions
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