diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2022-08-20 22:00:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-09-22 13:24:46 (GMT) |
commit | a509602699eb83fbbea67244051c8a18f708a6ae (patch) | |
tree | 94dc40d7c2f27d428e3e421a079fdb9c74ca29e3 /Utilities | |
parent | 914d21de58094d461c9f86738136fb034a691113 (diff) | |
download | CMake-a509602699eb83fbbea67244051c8a18f708a6ae.zip CMake-a509602699eb83fbbea67244051c8a18f708a6ae.tar.gz CMake-a509602699eb83fbbea67244051c8a18f708a6ae.tar.bz2 |
Build: Modernize some `foreach` calls to use `IN LISTS`/`IN ITEMS`
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/Sphinx/CMakeLists.txt | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt index ffca624..886f4e0 100644 --- a/Utilities/Sphinx/CMakeLists.txt +++ b/Utilities/Sphinx/CMakeLists.txt @@ -161,7 +161,7 @@ endif() set(doc_format_outputs "") set(doc_format_last "") -foreach(format ${doc_formats}) +foreach(format IN LISTS doc_formats) set(doc_format_output "doc_format_${format}") set(doc_format_log "build-${format}.log") if(CMake_SPHINX_CMAKE_ORG) @@ -219,13 +219,7 @@ endforeach() add_custom_target(documentation ALL DEPENDS ${doc_format_outputs}) if(CMake_SPHINX_DEPEND_ON_EXECUTABLES) - foreach(t - cmake - ccmake - cmake-gui - cpack - ctest - ) + foreach(t IN ITEMS cmake ccmake cmake-gui cpack ctest) if(TARGET ${t}) # Build documentation after main executables. add_dependencies(documentation ${t}) @@ -248,7 +242,7 @@ endif() if(SPHINX_MAN) file(GLOB man_rst RELATIVE ${CMake_SOURCE_DIR}/Help/manual ${CMake_SOURCE_DIR}/Help/manual/*.[1-9].rst) - foreach(m ${man_rst}) + foreach(m IN LISTS man_rst) if("x${m}" MATCHES "^x(.+)\\.([1-9])\\.rst$") set(name "${CMAKE_MATCH_1}") set(sec "${CMAKE_MATCH_2}") |