[clang-tools-extra] 94552f0 - [pseudo] Build inc files when cxx.bnf changes.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 1 04:49:12 PDT 2022


Author: Haojian Wu
Date: 2022-06-01T13:48:09+02:00
New Revision: 94552f02163a348d7b5a4001e0e719b1e617a5d2

URL: https://github.com/llvm/llvm-project/commit/94552f02163a348d7b5a4001e0e719b1e617a5d2
DIFF: https://github.com/llvm/llvm-project/commit/94552f02163a348d7b5a4001e0e719b1e617a5d2.diff

LOG: [pseudo] Build inc files when cxx.bnf changes.

Add the cxx.bnf file as a dependency of custom gen commands, so that the
inc files can be rebuilt when cxx.bnf changes.

Added: 
    

Modified: 
    clang-tools-extra/pseudo/include/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/pseudo/include/CMakeLists.txt b/clang-tools-extra/pseudo/include/CMakeLists.txt
index 3bf9709c2bed..7f64897a96f5 100644
--- a/clang-tools-extra/pseudo/include/CMakeLists.txt
+++ b/clang-tools-extra/pseudo/include/CMakeLists.txt
@@ -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)
@@ -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


        


More information about the cfe-commits mailing list