Skip to content

FindOpenMP: Add support for openmp 5.1 (llvm 17) and 5.2

Christoph Reiter requested to merge lazka/cmake:openmp-support-5.1_2 into master

llvm 17 now defaults to openmp 5.1, see https://github.com/llvm/llvm-project/commit/0c6f2f629cc0017361310fa4c132090413a874db, which makes FindOpenMP set OPENMP_FOUND and OpenMP_C_SPEC_DATE, but not OpenMP_C_VERSION, because it doesn't know the version mapping.

This results, for example, in sundials failing to build since it depends on OpenMP_C_VERSION being set, see downstream issue: https://github.com/msys2/MINGW-packages/pull/19065

This adds the spec date to version mapping for 5.1 and 5.2 to make things work again.

Backport: release
Topic-rename: FindOpenMP-5.1-and-5.2

Edited by Brad King

Merge request reports