Skip to content

Commit 656d6ea

Browse files
committed
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
1 parent 1e26c84 commit 656d6ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/FindOpenMP.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,8 @@ foreach(LANG IN LISTS OpenMP_FINDLIST)
509509
_OPENMP_GET_SPEC_DATE("${LANG}" OpenMP_${LANG}_SPEC_DATE_INTERNAL)
510510
set(OpenMP_${LANG}_SPEC_DATE "${OpenMP_${LANG}_SPEC_DATE_INTERNAL}" CACHE
511511
INTERNAL "${LANG} compiler's OpenMP specification date")
512-
_OPENMP_SET_VERSION_BY_SPEC_DATE("${LANG}")
513512
endif()
513+
_OPENMP_SET_VERSION_BY_SPEC_DATE("${LANG}")
514514

515515
set(OpenMP_${LANG}_FIND_QUIETLY ${OpenMP_FIND_QUIETLY})
516516
set(OpenMP_${LANG}_FIND_REQUIRED ${OpenMP_FIND_REQUIRED})

0 commit comments

Comments
 (0)