Skip to content

Commit 2161484

Browse files
committed
Try using INTERFACE_SYSTEM_INCLUDE_DIRECTORIES so documentation warnings doesn't error
1 parent e894a78 commit 2161484

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

cpp/cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3412,13 +3412,19 @@ function(build_google_cloud_cpp_storage)
34123412
# Unity build causes some build errors.
34133413
set(CMAKE_UNITY_BUILD FALSE)
34143414

3415-
# Disable -Wdocumentation-deprecated-sync warning for google-cloud-cpp.
3416-
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
3417-
string(APPEND CMAKE_CXX_FLAGS " -Wno-documentation-deprecated-sync")
3418-
endif()
3419-
34203415
fetchcontent_makeavailable(google_cloud_cpp)
34213416

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}")
3424+
endif()
3425+
endif()
3426+
endforeach()
3427+
34223428
# Remove unused directories to save build directory storage.
34233429
# 141MB -> 79MB
34243430
file(REMOVE_RECURSE "${google_cloud_cpp_SOURCE_DIR}/ci")

0 commit comments

Comments
 (0)