philo-he commented on code in PR #11905:
URL: https://github.com/apache/gluten/pull/11905#discussion_r3145191275


##########
dev/gluten-build-info.sh:
##########
@@ -49,6 +50,34 @@ function echo_clickhouse_revision_info() {
   echo ch_commit=$(cat $GLUTEN_ROOT/cpp-ch/clickhouse.version | grep -oP 
'(?<=^CH_COMMIT=).*')
 }
 
+function read_cmake_cache_path() {
+  CACHE_FILE="$GLUTEN_ROOT/cpp/build/CMakeCache.txt"
+  CACHE_KEY="$1"
+  if [ -f "$CACHE_FILE" ]; then
+    grep "^${CACHE_KEY}:PATH=" "$CACHE_FILE" | cut -d= -f2- | head -n 1
+  fi
+}
+
+function resolve_velox_home() {
+  if [ -n "$BACKEND_HOME" ]; then
+    echo "$BACKEND_HOME"
+    return
+  fi
+
+  if [ -n "${VELOX_HOME:-}" ]; then
+    echo "$VELOX_HOME"
+    return
+  fi
+
+  CACHED_VELOX_HOME=$(read_cmake_cache_path VELOX_HOME)

Review Comment:
   Is this detection always reliable? Can we just use this for getting velox 
home?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to