Skip to content

Commit 43eab2b

Browse files
committed
wip(UseCython): Improve formatting of add_custom_command aguments
1 parent f9e745b commit 43eab2b

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

src/cython_cmake/cmake/UseCython.cmake

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -358,17 +358,28 @@ function(add_cython_target _name)
358358
string(REGEX REPLACE " " ";" CYTHON_FLAGS_LIST "${CYTHON_FLAGS}")
359359

360360
# Add the command to run the compiler.
361-
add_custom_command(OUTPUT ${generated_file}
362-
COMMAND ${CYTHON_EXECUTABLE}
363-
ARGS ${cxx_arg} ${include_directory_arg} ${language_level_arg}
364-
${embed_arg} ${annotate_arg} ${cython_debug_arg}
365-
${line_directives_arg} ${CYTHON_FLAGS_LIST} ${pyx_location}
366-
--output-file ${generated_file}
367-
DEPENDS ${_source_file}
368-
${pxd_dependencies}
369-
IMPLICIT_DEPENDS ${target_language}
370-
${c_header_dependencies}
371-
COMMENT ${comment})
361+
add_custom_command(
362+
OUTPUT ${generated_file}
363+
COMMAND ${CYTHON_EXECUTABLE}
364+
ARGS
365+
${cxx_arg}
366+
${include_directory_arg}
367+
${language_level_arg}
368+
${embed_arg}
369+
${annotate_arg}
370+
${cython_debug_arg}
371+
${line_directives_arg}
372+
${CYTHON_FLAGS_LIST}
373+
${pyx_location}
374+
--output-file ${generated_file}
375+
DEPENDS
376+
${_source_file}
377+
${pxd_dependencies}
378+
IMPLICIT_DEPENDS
379+
${target_language}
380+
${c_header_dependencies}
381+
COMMENT ${comment}
382+
)
372383

373384
# NOTE(opadron): I thought about making a proper target, but after trying it
374385
# out, I decided that it would be far too convenient to use the same name as

0 commit comments

Comments
 (0)