From 656d6ea8215eaff0c3097efd8b1473d3233568cd Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 9 Jul 2020 06:08:39 -0400 Subject: FindOpenMP: Set version variables every time CMake runs The version is determined in two steps. First, the "spec date" is detected and cached. Second, the date is converted to a version. Move the second step out of the spec date cache guard condition so that it runs every time even if the spec date is already cached. Fixes: #19150 --- Modules/FindOpenMP.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index a4b1e1e..bb38e28 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -509,8 +509,8 @@ foreach(LANG IN LISTS OpenMP_FINDLIST) _OPENMP_GET_SPEC_DATE("${LANG}" OpenMP_${LANG}_SPEC_DATE_INTERNAL) set(OpenMP_${LANG}_SPEC_DATE "${OpenMP_${LANG}_SPEC_DATE_INTERNAL}" CACHE INTERNAL "${LANG} compiler's OpenMP specification date") - _OPENMP_SET_VERSION_BY_SPEC_DATE("${LANG}") endif() + _OPENMP_SET_VERSION_BY_SPEC_DATE("${LANG}") set(OpenMP_${LANG}_FIND_QUIETLY ${OpenMP_FIND_QUIETLY}) set(OpenMP_${LANG}_FIND_REQUIRED ${OpenMP_FIND_REQUIRED}) -- cgit v0.12