Skip to content

Commit 9d11128

Browse files
committed
[libclc] Improve clarity of CMake foreach. NFC.
Should be a bit easier to read.
1 parent 51b42b7 commit 9d11128

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libclc/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if( LIBCLC_STANDALONE_BUILD OR CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DI
5050
endif()
5151

5252
# Import required tools as targets
53-
foreach( tool clang llvm-as llvm-link opt )
53+
foreach( tool IN ITEMS clang llvm-as llvm-link opt )
5454
find_program( LLVM_TOOL_${tool} ${tool} PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )
5555
add_executable( libclc::${tool} IMPORTED GLOBAL )
5656
set_target_properties( libclc::${tool} PROPERTIES IMPORTED_LOCATION ${LLVM_TOOL_${tool}} )
@@ -68,7 +68,7 @@ else()
6868
message(FATAL_ERROR "Clang is not enabled, but is required to build libclc in-tree")
6969
endif()
7070

71-
foreach( tool clang llvm-as llvm-link opt )
71+
foreach( tool IN ITEMS clang llvm-as llvm-link opt )
7272
add_executable(libclc::${tool} ALIAS ${tool})
7373
endforeach()
7474
endif()
@@ -181,7 +181,7 @@ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libclc.pc DESTINATION "${CMAKE_INSTAL
181181
install( DIRECTORY generic/include/clc DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" )
182182

183183
if( ENABLE_RUNTIME_SUBNORMAL )
184-
foreach( file subnormal_use_default subnormal_disable )
184+
foreach( file IN ITEMS subnormal_use_default subnormal_disable )
185185
link_bc(
186186
TARGET ${file}
187187
INPUTS ${PROJECT_SOURCE_DIR}/generic/lib/${file}.ll

0 commit comments

Comments
 (0)