Skip to content

Commit

Permalink
docs: Add use of depfile to CMake instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbaker committed Apr 8, 2024
1 parent 24bbeff commit a4a0d94
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 a4a0d94

Please sign in to comment.