raulcd commented on code in PR #55319:
URL: https://github.com/apache/arrow/pull/55319#discussion_r4552876660


##########
cpp/examples/minimal_build/CMakeLists.txt:
##########
@@ -67,3 +67,30 @@ elseif(ARROW_EXAMPLE_S3_STATIC_CHECK)
   message(STATUS "Skipping arrow-example-s3-static: "
                  "requires ARROW_S3 and Arrow::arrow_static")
 endif()
+
+option(ARROW_EXAMPLE_GCS_STATIC_CHECK "Verify GCS and static linking" OFF)
+if(ARROW_EXAMPLE_GCS_STATIC_CHECK
+   AND ARROW_GCS
+   AND TARGET Arrow::arrow_static)
+  find_package(ArrowGcs REQUIRED)
+  if(NOT TARGET ArrowGcs::arrow_gcs_static)
+    message(FATAL_ERROR "ArrowGcs::arrow_gcs_static not found")
+  endif()
+  add_executable(arrow-example-gcs-static example.cc)
+  target_compile_definitions(arrow-example-gcs-static
+                             PRIVATE ARROW_EXAMPLE_GCS_STATIC_CHECK)
+  target_link_libraries(arrow-example-gcs-static PRIVATE 
ArrowGcs::arrow_gcs_static)
+
+  if(TARGET ArrowS3::arrow_s3_static)
+    add_executable(arrow-example-s3-gcs-static example.cc)
+    target_compile_definitions(arrow-example-s3-gcs-static
+                               PRIVATE ARROW_EXAMPLE_S3_STATIC_CHECK
+                                       ARROW_EXAMPLE_GCS_STATIC_CHECK)
+    target_link_libraries(arrow-example-s3-gcs-static PRIVATE 
ArrowS3::arrow_s3_static
+                                                              
ArrowGcs::arrow_gcs_static)

Review Comment:
   shouldn't we require `ARROW_EXAMPLE_S3_STATIC_CHECK` here too? I am not sure 
the if is covering this.



##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -3860,13 +3864,8 @@ function(build_google_cloud_cpp_storage)
   # 141MB -> 79MB
   file(REMOVE_RECURSE "${google_cloud_cpp_SOURCE_DIR}/ci")
 
-  list(PREPEND
-       ARROW_BUNDLED_STATIC_LIBS
-       google-cloud-cpp::storage
-       google-cloud-cpp::rest_internal
-       google-cloud-cpp::common)
-  set(ARROW_BUNDLED_STATIC_LIBS
-      ${ARROW_BUNDLED_STATIC_LIBS}
+  set(ARROW_GCS_BUNDLED_STATIC_LIBS
+      google-cloud-cpp::storage google-cloud-cpp::rest_internal 
google-cloud-cpp::common

Review Comment:
   I am still trying to get my head around why this is an issue but 
   ```
   list(PREPEND ARROW_BUNDLED_STATIC_LIBS ${AWSSDK_LINK_LIBRARIES})
   ```
   isn't and we don't seem to require an `ARROW_S3_BUNDLED_STATIC_LIBS`



-- 
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]

Reply via email to