summaryrefslogtreecommitdiffstats
path: root/Tests/CTestUpdateCommon.cmake
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-08-20 22:00:05 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-22 13:24:46 (GMT)
commita509602699eb83fbbea67244051c8a18f708a6ae (patch)
tree94dc40d7c2f27d428e3e421a079fdb9c74ca29e3 /Tests/CTestUpdateCommon.cmake
parent914d21de58094d461c9f86738136fb034a691113 (diff)
downloadCMake-a509602699eb83fbbea67244051c8a18f708a6ae.zip
CMake-a509602699eb83fbbea67244051c8a18f708a6ae.tar.gz
CMake-a509602699eb83fbbea67244051c8a18f708a6ae.tar.bz2
Build: Modernize some `foreach` calls to use `IN LISTS`/`IN ITEMS`
Diffstat (limited to 'Tests/CTestUpdateCommon.cmake')
-rw-r--r--Tests/CTestUpdateCommon.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake
index 0f8ec8e..467b41a 100644
--- a/Tests/CTestUpdateCommon.cmake
+++ b/Tests/CTestUpdateCommon.cmake
@@ -73,7 +73,7 @@ function(check_updates build)
string(REGEX REPLACE "${rev_regex}" "\\1" element "${r}")
set(element_${element} 1)
endforeach()
- foreach(element ${rev_elements})
+ foreach(element IN LISTS rev_elements)
if(NOT element_${element})
list(APPEND MISSING "global <${element}> element")
endif()
@@ -85,7 +85,7 @@ function(check_updates build)
if(MISSING)
# List the missing entries
string(APPEND MSG "Update.xml is missing expected entries:\n")
- foreach(f ${MISSING})
+ foreach(f IN LISTS MISSING)
string(APPEND MSG " ${f}\n")
endforeach()
else()
@@ -97,7 +97,7 @@ function(check_updates build)
if(EXTRA)
# List the extra entries
string(APPEND MSG "Update.xml has extra unexpected entries:\n")
- foreach(f ${EXTRA})
+ foreach(f IN LISTS EXTRA)
string(APPEND MSG " ${f}\n")
endforeach()
else()