Skip to content

Commit 7e303b6

Browse files
committed
Try disabling unity builds and removing warning errors
1 parent e24724f commit 7e303b6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cpp/cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3409,8 +3409,20 @@ function(build_google_cloud_cpp_storage)
34093409
set(GOOGLE_CLOUD_CPP_ENABLE_WERROR OFF)
34103410
set(GOOGLE_CLOUD_CPP_WITH_MOCKS OFF)
34113411
set(BUILD_TESTING OFF)
3412+
# Unity build causes some build errors.
3413+
set(CMAKE_UNITY_BUILD FALSE)
34123414
fetchcontent_makeavailable(google_cloud_cpp)
34133415

3416+
# Disable -Wdocumentation-deprecated-sync warning for google-cloud-cpp.
3417+
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()
3424+
endif()
3425+
34143426
# Remove unused directories to save build directory storage.
34153427
# 141MB -> 79MB
34163428
file(REMOVE_RECURSE "${google_cloud_cpp_SOURCE_DIR}/ci")

0 commit comments

Comments
 (0)