From e9eb87d10adc91ded2767b214618c2549fb3a45f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Szab=C3=B3?= Date: Sun, 21 Sep 2025 13:02:08 -0400 Subject: [PATCH] Specify dependencies for add_custom_command() calls List input files as dependencies for add_custom_command() calls. This avoids failures in incremental builds if e.g. TraceFieldType.txt changes, since CMake will be able to mark the output as out of date and regenerate it as needed. Follows-up #572 --- proxygen/lib/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proxygen/lib/CMakeLists.txt b/proxygen/lib/CMakeLists.txt index cb9de0243e..adadf6c7ce 100644 --- a/proxygen/lib/CMakeLists.txt +++ b/proxygen/lib/CMakeLists.txt @@ -33,6 +33,7 @@ add_custom_command( ${CMAKE_CURRENT_SOURCE_DIR}/stats/gen_StatsWrapper.sh ${PROXYGEN_FBCODE_ROOT} DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/stats/gen_StatsWrapper.sh ${CMAKE_CURRENT_SOURCE_DIR}/stats/BaseStats.h COMMENT "Generating StatsWrapper.h" ) @@ -52,6 +53,10 @@ add_custom_command( --header_path=proxygen/lib/utils --install_dir=${PROXYGEN_GENERATED_ROOT}/proxygen/lib/utils --fbcode_dir=${PROXYGEN_FBCODE_ROOT} + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/utils/gen_trace_event_constants.py + ${CMAKE_CURRENT_SOURCE_DIR}/utils/samples/TraceEventType.txt + ${CMAKE_CURRENT_SOURCE_DIR}/utils/samples/TraceFieldType.txt WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/utils/ COMMENT "Generating TraceEventType and TraceFieldType"