Skip to content

Commit 8fd0b63

Browse files
committed
Format generator/CMakeLists.txt
1 parent 2d1f036 commit 8fd0b63

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

test/generator/CMakeLists.txt

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
if (Halide_TARGET MATCHES "wasm")
1010
set(_USING_WASM 1)
11-
else()
11+
else ()
1212
set(_USING_WASM 0)
13-
endif()
13+
endif ()
1414

1515
function(add_wasm_executable TARGET)
1616
set(options)
@@ -127,22 +127,22 @@ function(_add_halide_libraries TARGET)
127127
# Passing on a no-value arg in CMake is unpleasant
128128
if (args_GRADIENT_DESCENT)
129129
set(GRADIENT_DESCENT_OPT "GRADIENT_DESCENT")
130-
else()
130+
else ()
131131
set(GRADIENT_DESCENT_OPT "")
132-
endif()
132+
endif ()
133133

134134
# Fill in default values for some arguments, as needed
135135
if (NOT args_FROM)
136136
add_halide_generator("${TARGET}.generator"
137137
SOURCES "${TARGET}_generator.cpp")
138138
set(args_FROM "${TARGET}.generator")
139-
endif()
139+
endif ()
140140
if (NOT args_GENERATOR_NAME)
141141
set(args_GENERATOR_NAME "${TARGET}")
142-
endif()
142+
endif ()
143143
if (NOT args_FUNCTION_NAME)
144144
set(args_FUNCTION_NAME "${TARGET}")
145-
endif()
145+
endif ()
146146

147147
set(TARGET_CPP "${TARGET}_cpp")
148148

@@ -161,7 +161,7 @@ function(_add_halide_libraries TARGET)
161161
FUNCTION_INFO_HEADER function_info_header_out)
162162
if (args_EXTERNS)
163163
target_link_libraries(${TARGET} INTERFACE ${args_EXTERNS})
164-
endif()
164+
endif ()
165165

166166
if (NOT args_OMIT_C_BACKEND)
167167
# The C backend basically ignores TARGETS (it emits a warning that the sources
@@ -186,7 +186,7 @@ function(_add_halide_libraries TARGET)
186186
FUNCTION_INFO_HEADER function_info_header_cpp_out)
187187
if (args_EXTERNS)
188188
target_link_libraries(${TARGET_CPP} INTERFACE ${args_EXTERNS})
189-
endif()
189+
endif ()
190190
# This is a bit subtle: we end up emitting NAME.h and NAME_cpp.h header files;
191191
# these are *identical* in content (aside from the guard macro and the filename).
192192
# For convenience, we use the NAME.h variant in all cases downstream (even when linking
@@ -195,7 +195,7 @@ function(_add_halide_libraries TARGET)
195195
# on NAME.h already being generated.) This is a bit suboptimal, but it is arguably better
196196
# that having conditionalized #includes in all the downstream test targets.
197197
add_dependencies(${TARGET_CPP} ${TARGET})
198-
endif()
198+
endif ()
199199
endfunction()
200200

201201
function(_add_one_aot_test TARGET)
@@ -256,17 +256,17 @@ function(_add_halide_aot_tests NAME)
256256
# with a matching name
257257
if (NOT args_HALIDE_LIBRARIES)
258258
set(args_HALIDE_LIBRARIES "${NAME}")
259-
endif()
259+
endif ()
260260

261261
# If no Halide runtime specified, use one from the first halide_library in the list
262262
if (NOT args_HALIDE_RUNTIME)
263263
list(GET args_HALIDE_LIBRARIES 0 HR)
264264
set(args_HALIDE_RUNTIME "${HR}.runtime")
265-
endif()
265+
endif ()
266266

267267
if (NOT args_SRCS)
268268
set(args_SRCS "${NAME}_aottest.cpp")
269-
endif()
269+
endif ()
270270

271271
set(TARGET "generator_aot_${NAME}")
272272
set(TARGET_CPP "generator_aotcpp_${NAME}")
@@ -288,7 +288,7 @@ function(_add_halide_aot_tests NAME)
288288
"${Halide_SOURCE_DIR}/tools"
289289
"${CMAKE_CURRENT_BINARY_DIR}")
290290
add_wasm_halide_test("${TARGET}" GROUPS generator "${args_GROUPS}")
291-
else()
291+
else ()
292292
_add_one_aot_test("${TARGET}"
293293
SRCS "${args_SRCS}"
294294
DEPS ${args_HALIDE_LIBRARIES} ${args_HALIDE_RUNTIME} ${args_DEPS}
@@ -298,14 +298,14 @@ function(_add_halide_aot_tests NAME)
298298
set(HALIDE_LIBRARIES_CPP "")
299299
foreach (hl IN LISTS args_HALIDE_LIBRARIES)
300300
list(APPEND HALIDE_LIBRARIES_CPP "${hl}_cpp")
301-
endforeach()
301+
endforeach ()
302302
_add_one_aot_test("${TARGET_CPP}"
303303
SRCS "${args_SRCS}"
304304
DEPS ${HALIDE_LIBRARIES_CPP} ${args_HALIDE_RUNTIME} ${args_DEPS}
305305
INCLUDES ${args_INCLUDES}
306306
GROUPS ${args_GROUPS})
307-
endif()
308-
endif()
307+
endif ()
308+
endif ()
309309
endfunction()
310310

311311
if ("NVPTX" IN_LIST Halide_LLVM_COMPONENTS)
@@ -585,9 +585,9 @@ if (${_USING_WASM})
585585
elseif (Halide_CMAKE_TARGET MATCHES ";")
586586
# multiarch doesn't support multitargets
587587
set(MDT_TARGETS cmake)
588-
else()
588+
else ()
589589
set(MDT_TARGETS cmake-no_bounds_query cmake)
590-
endif()
590+
endif ()
591591

592592
_add_halide_libraries(metadata_tester
593593
PARAMS ${metadata_tester_params}
@@ -609,15 +609,15 @@ _add_halide_aot_tests(metal_completion_handler_override)
609609
# msan_generator.cpp
610610
if ("${Halide_TARGET}" MATCHES "webgpu")
611611
message(WARNING "Test generator_aot_msan is not supported under WebGPU")
612-
else()
612+
else ()
613613
_add_halide_libraries(msan
614614
FEATURES msan
615615
# Broken for C++ backend (https://github.com/halide/Halide/issues/7273)
616616
OMIT_C_BACKEND)
617617
_add_halide_aot_tests(msan
618618
OMIT_C_BACKEND
619619
GROUPS multithreaded)
620-
endif()
620+
endif ()
621621

622622
# (Doesn't build/link properly on windows / under wasm)
623623
if (NOT Halide_TARGET MATCHES "windows" AND NOT CMAKE_SYSTEM_NAME MATCHES "Windows" AND NOT ${_USING_WASM})
@@ -635,11 +635,11 @@ if (NOT _USING_WASM AND NOT Halide_CMAKE_TARGET MATCHES ";")
635635
# multitarget_aottest.cpp
636636
# multitarget_generator.cpp
637637
_add_halide_libraries(multitarget
638-
# ... or to the C backend
639-
OMIT_C_BACKEND
640-
TARGETS cmake-no_bounds_query cmake
641-
FEATURES c_plus_plus_name_mangling
642-
FUNCTION_NAME HalideTest::multitarget)
638+
# ... or to the C backend
639+
OMIT_C_BACKEND
640+
TARGETS cmake-no_bounds_query cmake
641+
FEATURES c_plus_plus_name_mangling
642+
FUNCTION_NAME HalideTest::multitarget)
643643

644644
# Note that we make two tests here so that we can run it two ways,
645645
# to ensure that both target paths are taken.
@@ -678,7 +678,7 @@ _add_halide_aot_tests(output_assign)
678678

679679
# pyramid_aottest.cpp
680680
# pyramid_generator.cpp
681-
_add_halide_libraries(pyramid PARAMS levels=10 )
681+
_add_halide_libraries(pyramid PARAMS levels=10)
682682
_add_halide_aot_tests(pyramid GROUPS multithreaded)
683683

684684
# rdom_input_aottest.cpp

0 commit comments

Comments
 (0)