Skip to content

Commit e894a78

Browse files
committed
Add OVERRIDE_PACKAGE to crc32c and add -Wno-documentation-deprecated-sync to CMAKE_CXX_FLAGS instead of per-target
1 parent 7e303b6 commit e894a78

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

cpp/cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3286,7 +3286,7 @@ function(build_crc32c_once)
32863286
PARENT_SCOPE)
32873287

32883288
fetchcontent_declare(crc32c
3289-
${FC_DECLARE_COMMON_OPTIONS}
3289+
${FC_DECLARE_COMMON_OPTIONS} OVERRIDE_FIND_PACKAGE
32903290
URL ${CRC32C_SOURCE_URL}
32913291
URL_HASH "SHA256=${ARROW_CRC32C_BUILD_SHA256_CHECKSUM}")
32923292

@@ -3411,18 +3411,14 @@ function(build_google_cloud_cpp_storage)
34113411
set(BUILD_TESTING OFF)
34123412
# Unity build causes some build errors.
34133413
set(CMAKE_UNITY_BUILD FALSE)
3414-
fetchcontent_makeavailable(google_cloud_cpp)
34153414

34163415
# Disable -Wdocumentation-deprecated-sync warning for google-cloud-cpp.
34173416
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
3418-
foreach(_target google-cloud-cpp::storage google-cloud-cpp::rest_internal
3419-
google-cloud-cpp::common)
3420-
if(TARGET ${_target})
3421-
target_compile_options(${_target} INTERFACE -Wno-documentation-deprecated-sync)
3422-
endif()
3423-
endforeach()
3417+
string(APPEND CMAKE_CXX_FLAGS " -Wno-documentation-deprecated-sync")
34243418
endif()
34253419

3420+
fetchcontent_makeavailable(google_cloud_cpp)
3421+
34263422
# Remove unused directories to save build directory storage.
34273423
# 141MB -> 79MB
34283424
file(REMOVE_RECURSE "${google_cloud_cpp_SOURCE_DIR}/ci")

0 commit comments

Comments
 (0)