Skip to content

Commit

Permalink
[pseudo] Build inc files when cxx.bnf changes.
Browse files Browse the repository at this point in the history
Add the cxx.bnf file as a dependency of custom gen commands, so that the
inc files can be rebuilt when cxx.bnf changes.
  • Loading branch information
hokein committed Jun 1, 2022
1 parent f6dbb0b commit 94552f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang-tools-extra/pseudo/include/CMakeLists.txt
Expand Up @@ -17,7 +17,7 @@ add_custom_command(OUTPUT ${cxx_symbols_inc}
--emit-symbol-list
-o ${cxx_symbols_inc}
COMMENT "Generating nonterminal symbol file for cxx grammar..."
DEPENDS ${pseudo_gen_target}
DEPENDS ${pseudo_gen_target} ${cxx_bnf}
VERBATIM)

set(cxx_bnf_inc ${CMAKE_CURRENT_BINARY_DIR}/CXXBNF.inc)
Expand All @@ -27,7 +27,7 @@ add_custom_command(OUTPUT ${cxx_bnf_inc}
--emit-grammar-content
-o ${cxx_bnf_inc}
COMMENT "Generating bnf string file for cxx grammar..."
DEPENDS ${pseudo_gen_target}
DEPENDS ${pseudo_gen_target} ${cxx_bnf}
VERBATIM)

# add_custom_command does not create a new target, we need to deine a target
Expand Down

0 comments on commit 94552f0

Please sign in to comment.