This is an automated email from the ASF dual-hosted git repository.

zhouyuan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new c7091596f3 [GLUTEN-12742][CORE] Fix protoc DEPENDS so incremental 
builds regenerate proto sources (#12744)
c7091596f3 is described below

commit c7091596f303b31e7684d73ca692a4ca0ee3c99d
Author: Niels Pardon <[email protected]>
AuthorDate: Thu Aug 20 10:53:40 2026 +0200

    [GLUTEN-12742][CORE] Fix protoc DEPENDS so incremental builds regenerate 
proto sources (#12744)
---
 cpp/core/CMakeLists.txt | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/cpp/core/CMakeLists.txt b/cpp/core/CMakeLists.txt
index 240567b8ff..e0d82d4204 100644
--- a/cpp/core/CMakeLists.txt
+++ b/cpp/core/CMakeLists.txt
@@ -87,7 +87,8 @@ set(PROTO_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/proto")
 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/proto)
 
 # List Substrait Proto compiled files
-file(GLOB SUBSTRAIT_PROTO_FILES ${SUBSTRAIT_PROTO_SRC_DIR}/substrait/*.proto
+file(GLOB SUBSTRAIT_PROTO_FILES CONFIGURE_DEPENDS
+     ${SUBSTRAIT_PROTO_SRC_DIR}/substrait/*.proto
      ${SUBSTRAIT_PROTO_SRC_DIR}/substrait/extensions/*.proto)
 foreach(PROTO ${SUBSTRAIT_PROTO_FILES})
   file(RELATIVE_PATH REL_PROTO ${SUBSTRAIT_PROTO_SRC_DIR} ${PROTO})
@@ -99,11 +100,9 @@ set(SUBSTRAIT_PROTO_OUTPUT_FILES ${SUBSTRAIT_PROTO_HDRS}
                                  ${SUBSTRAIT_PROTO_SRCS})
 set_source_files_properties(${SUBSTRAIT_PROTO_OUTPUT_FILES} PROPERTIES 
GENERATED
                                                                        TRUE)
-get_filename_component(SUBSTRAIT_PROTO_DIR ${SUBSTRAIT_PROTO_SRC_DIR}/
-                       DIRECTORY)
 
 # List Gluten Proto compiled files
-file(GLOB GLUTEN_PROTO_FILES ${GLUTEN_PROTO_SRC_DIR}/*.proto)
+file(GLOB GLUTEN_PROTO_FILES CONFIGURE_DEPENDS ${GLUTEN_PROTO_SRC_DIR}/*.proto)
 foreach(PROTO ${GLUTEN_PROTO_FILES})
   file(RELATIVE_PATH REL_PROTO ${GLUTEN_PROTO_SRC_DIR} ${PROTO})
   string(REGEX REPLACE "\\.proto" "" PROTO_NAME ${REL_PROTO})
@@ -113,7 +112,6 @@ endforeach()
 set(GLUTEN_PROTO_OUTPUT_FILES ${GLUTEN_PROTO_HDRS} ${GLUTEN_PROTO_SRCS})
 set_source_files_properties(${GLUTEN_PROTO_OUTPUT_FILES} PROPERTIES GENERATED
                                                                     TRUE)
-get_filename_component(GLUTEN_PROTO_DIR ${GLUTEN_PROTO_SRC_DIR}/ DIRECTORY)
 
 set(SPARK_COLUMNAR_PLUGIN_SRCS
     ${SUBSTRAIT_PROTO_SRCS}
@@ -221,7 +219,7 @@ add_custom_command(
   OUTPUT ${SUBSTRAIT_PROTO_OUTPUT_FILES}
   COMMAND ${PROTOC_BIN} --proto_path ${SUBSTRAIT_PROTO_SRC_DIR}/ --cpp_out
           ${PROTO_OUTPUT_DIR} ${SUBSTRAIT_PROTO_FILES}
-  DEPENDS ${SUBSTRAIT_PROTO_DIR}
+  DEPENDS ${SUBSTRAIT_PROTO_FILES}
   COMMENT "Running Substrait PROTO compiler"
   VERBATIM)
 
@@ -229,7 +227,7 @@ add_custom_command(
   OUTPUT ${GLUTEN_PROTO_OUTPUT_FILES}
   COMMAND ${PROTOC_BIN} --proto_path ${GLUTEN_PROTO_SRC_DIR}/ --cpp_out
           ${PROTO_OUTPUT_DIR} ${GLUTEN_PROTO_FILES}
-  DEPENDS ${GLUTEN_PROTO_DIR}
+  DEPENDS ${GLUTEN_PROTO_FILES}
   COMMENT "Running Gluten PROTO compiler"
   VERBATIM)
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to