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 /Tests/RunCMake/CMakeLists.txt | |
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 'Tests/RunCMake/CMakeLists.txt')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index db4200b..1d7cccf 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -527,7 +527,9 @@ function(add_RunCMake_test_try_compile) set(CMAKE_CXX_STANDARD_DEFAULT 14) endif() endif() - foreach(var + foreach( + var + IN ITEMS CMAKE_SYSTEM_NAME CMAKE_C_COMPILER_ID CMAKE_C_COMPILER_VERSION @@ -541,7 +543,7 @@ function(add_RunCMake_test_try_compile) CMake_TEST_FILESYSTEM_1S CMAKE_OBJC_STANDARD_DEFAULT CMAKE_OBJCXX_STANDARD_DEFAULT - ) + ) if(DEFINED ${var}) list(APPEND try_compile_ARGS -D${var}=${${var}}) endif() @@ -956,7 +958,7 @@ if(CMake_TEST_ANDROID_NDK OR CMake_TEST_ANDROID_STANDALONE_TOOLCHAIN) if(NOT "${CMAKE_GENERATOR}" MATCHES "Make|Ninja|Visual Studio 1[456]") message(FATAL_ERROR "Android tests supported only by Makefile, Ninja, and Visual Studio >= 14 generators") endif() - foreach(v TEST_ANDROID_NDK TEST_ANDROID_STANDALONE_TOOLCHAIN) + foreach(v IN ITEMS TEST_ANDROID_NDK TEST_ANDROID_STANDALONE_TOOLCHAIN) if(CMake_${v}) string(REPLACE ";" "|" ${v} "${CMake_${v}}") list(APPEND Android_ARGS "-D${v}=${${v}}") |