Disable deprecated-builtins warnings in clang.

Since upgrading to Clang 15, abseil fails to build, because of abseil/abseil-cpp#1201.

PiperOrigin-RevId: 486190797
Change-Id: Ibaa1c03b8d21ae4a83c3825c8d56363aa2f89505
This commit is contained in:
Nimrod Gileadi
2022-11-04 11:35:19 -07:00
committed by Copybara-Service
parent 9833f912c1
commit 0514010928
4 changed files with 27 additions and 0 deletions
+6
View File
@@ -46,6 +46,12 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Cl
add_compile_options(-fdata-sections -ffunction-sections)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "15.0.0")
# Needed for https://github.com/abseil/abseil-cpp/issues/1201, until a new
# version of abseil is released with the fix.
add_compile_options(-Wno-deprecated-builtins)
endif()
include(MujocoLinkOptions)
get_mujoco_extra_link_options(EXTRA_LINK_OPTIONS)
add_link_options(${EXTRA_LINK_OPTIONS})