tuhaihe commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2447490112
##########
src/ports/cloudberry/cmake/FindCloudberry.cmake:
##########
@@ -0,0 +1,33 @@
+# Set defaults that can be overridden by files that include this file:
+if(NOT DEFINED _FIND_PACKAGE_FILE)
+ set(_FIND_PACKAGE_FILE "${CMAKE_CURRENT_LIST_FILE}")
+endif(NOT DEFINED _FIND_PACKAGE_FILE)
+
+# Set parameters for calling FindPostgreSQL.cmake
+set(_NEEDED_PG_CONFIG_PACKAGE_NAME "Apache Cloudberry")
+set(_PG_CONFIG_VERSION_NUM_MACRO "GP_VERSION_NUM")
+set(_PG_CONFIG_VERSION_MACRO "GP_VERSION")
+set(_SEARCH_PATH_HINTS
+ "/usr/local/cloudberry-db-devel/bin"
+ "/usr/local/cloudberry-db/bin"
+ "$ENV{GPHOME}/bin"
+)
+
+include("${CMAKE_CURRENT_LIST_DIR}/../../postgres/cmake/FindPostgreSQL.cmake")
+
+if(${PKG_NAME}_FOUND)
+ # server/funcapi.h ultimately includes server/access/xact.h, from which
+ # cdb/cdbpathlocus.h is included
+ execute_process(COMMAND ${${PKG_NAME}_PG_CONFIG} --pkgincludedir
+ OUTPUT_VARIABLE ${PKG_NAME}_ADDITIONAL_INCLUDE_DIRS
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ set(${PKG_NAME}_ADDITIONAL_INCLUDE_DIRS
+ "${${PKG_NAME}_ADDITIONAL_INCLUDE_DIRS}/internal")
+ if(_PG_CONFIG_HEADER_CONTENTS MATCHES "#define SERVERLESS 1")
+ message("-- Detected Hashdata Cloud (Cloudberry Serverless)")
+ set(CLOUDBERRY_SERVERLESS TRUE PARENT_SCOPE)
Review Comment:
Remove these lines?
##########
src/ports/cloudberry/cmake/FindCloudberry.cmake:
##########
@@ -0,0 +1,33 @@
+# Set defaults that can be overridden by files that include this file:
+if(NOT DEFINED _FIND_PACKAGE_FILE)
+ set(_FIND_PACKAGE_FILE "${CMAKE_CURRENT_LIST_FILE}")
+endif(NOT DEFINED _FIND_PACKAGE_FILE)
+
+# Set parameters for calling FindPostgreSQL.cmake
+set(_NEEDED_PG_CONFIG_PACKAGE_NAME "Apache Cloudberry")
+set(_PG_CONFIG_VERSION_NUM_MACRO "GP_VERSION_NUM")
+set(_PG_CONFIG_VERSION_MACRO "GP_VERSION")
+set(_SEARCH_PATH_HINTS
+ "/usr/local/cloudberry-db-devel/bin"
+ "/usr/local/cloudberry-db/bin"
Review Comment:
Is there a need to add `/usr/local/cbdb/bin`?
--
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]