mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
39 lines
561 B
CMake
39 lines
561 B
CMake
set(ZIG_FORMAT_SOURCES ${BUN_ZIG_SOURCES})
|
|
|
|
register_command(
|
|
TARGET
|
|
zig-format-check
|
|
COMMENT
|
|
"Checking zig fmt"
|
|
COMMAND
|
|
${ZIG_EXECUTABLE}
|
|
fmt
|
|
--check
|
|
${ZIG_FORMAT_SOURCES}
|
|
ALWAYS_RUN
|
|
)
|
|
|
|
register_command(
|
|
TARGET
|
|
zig-format
|
|
COMMENT
|
|
"Running zig fmt"
|
|
COMMAND
|
|
${ZIG_EXECUTABLE}
|
|
fmt
|
|
${ZIG_FORMAT_SOURCES}
|
|
ALWAYS_RUN
|
|
)
|
|
|
|
register_command(
|
|
TARGET
|
|
zig-format-diff
|
|
COMMENT
|
|
"Running zig fmt on changed files"
|
|
COMMAND
|
|
${ZIG_FORMAT_DIFF_COMMAND}
|
|
CWD
|
|
${BUILD_PATH}
|
|
ALWAYS_RUN
|
|
)
|