Skip to content

Commit

Permalink
docs: Add use of depfile to CMake isntructions
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbaker committed Mar 29, 2024
1 parent c8386b8 commit ff184a6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/fypp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2109,11 +2109,15 @@ very first version of this example)::
# Generate input file name
set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${infileName}")

# Create the dependency file
set(depfile "${CMAKE_CURRENT_BINARY_DIR/${outfileName}.d")

# Custom command to do the processing
add_custom_command(
OUTPUT "${outfile}"
COMMAND fypp "${infile}" "${outfile}"
COMMAND fypp "${infile}" "${outfile}" --depfile "${depfile}"
MAIN_DEPENDENCY "${infile}"
DEPFILE "${depfile}"
VERBATIM)

# Finally add output file to a list
Expand Down

0 comments on commit ff184a6

Please sign in to comment.