Skip to content

Commit

Permalink
Add MAKE_DIRECTORY and RESULT to file()
Browse files Browse the repository at this point in the history
MAKE_DIRECTORY is a multi-value keyword, RESULT is a one-value keyword.
  • Loading branch information
petk authored and BlankSpruce committed Oct 15, 2024
1 parent a84973c commit 06c798d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ class File(TwoWordKeywordIsolator, MultipleSignatureCommandInvocationDumper):
options=["CONFIGURE_DEPENDS", "FOLLOW_SYMLINKS"],
one_value_keywords=["GLOB_RECURSE", "LIST_DIRECTORIES", "RELATIVE"],
),
"MAKE_DIRECTORY": dict(
one_value_keywords=["RESULT"],
multi_value_keywords=["MAKE_DIRECTORY"],
),
"RENAME": dict(
front_positional_arguments=["<oldname>", "<newname>"],
options=["NO_REPLACE"],
Expand Down
4 changes: 2 additions & 2 deletions tests/formatter/file_command.in.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ file(REMOVE_RECURSE foo bar)

file(REMOVE_RECURSE long_filename__________________________ long_filename__________________________)

file(MAKE_DIRECTORY foo bar)
file(MAKE_DIRECTORY foo bar RESULT result)

file(MAKE_DIRECTORY long_filename__________________________ long_filename__________________________)
file(MAKE_DIRECTORY long_filename__________________________ long_filename__________________________ RESULT result)

file(COPY foo bar DESTINATION baz)

Expand Down
7 changes: 4 additions & 3 deletions tests/formatter/file_command.out.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,13 @@ file(
long_filename__________________________
)

file(MAKE_DIRECTORY foo bar)
file(MAKE_DIRECTORY foo bar RESULT result)

file(
MAKE_DIRECTORY
long_filename__________________________
long_filename__________________________
long_filename__________________________
long_filename__________________________
RESULT result
)

file(COPY foo bar DESTINATION baz)
Expand Down

0 comments on commit 06c798d

Please sign in to comment.