Skip to content

Commit 2557c97

Browse files
committed
Try using -Wno-documentation-deprecated-sync on underlying targets, not aliases
1 parent 2161484 commit 2557c97

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

cpp/cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3414,16 +3414,15 @@ function(build_google_cloud_cpp_storage)
34143414

34153415
fetchcontent_makeavailable(google_cloud_cpp)
34163416

3417-
# Mark google-cloud-cpp includes as SYSTEM to suppress documentation warnings.
3418-
foreach(_target storage_client storage_protos rest_internal common)
3419-
if(TARGET ${_target})
3420-
get_target_property(_include_dirs ${_target} INTERFACE_INCLUDE_DIRECTORIES)
3421-
if(_include_dirs)
3422-
set_target_properties(${_target} PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
3423-
"${_include_dirs}")
3417+
# Suppress documentation warnings for google-cloud-cpp headers.
3418+
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang")
3419+
foreach(_target storage_client rest_internal common)
3420+
if(TARGET ${_target})
3421+
target_compile_options(${_target} INTERFACE -Wno-documentation
3422+
-Wno-documentation-deprecated-sync)
34243423
endif()
3425-
endif()
3426-
endforeach()
3424+
endforeach()
3425+
endif()
34273426

34283427
# Remove unused directories to save build directory storage.
34293428
# 141MB -> 79MB

0 commit comments

Comments
 (0)