Force Abseil's SourceLocation implementation for compatibility with clang 13/14.

PiperOrigin-RevId: 935926249
Change-Id: I063544e37eb735d0461a20c2ede7e23ea28d23bc
This commit is contained in:
Michael Moss
2026-06-22 02:01:11 -07:00
committed by Copybara-Service
parent bf59ca6a1b
commit 34d142ee50
2 changed files with 16 additions and 0 deletions
+5
View File
@@ -278,6 +278,9 @@ if(MUJOCO_BUILD_TESTS OR MUJOCO_BUILD_STUDIO OR MUJOCO_USE_FILAMENT)
CACHE INTERNAL "Build tests."
)
set(ABSL_PATCH_COMMAND
git apply --reject --whitespace=fix ${mujoco_SOURCE_DIR}/cmake/abseil-cpp-source_location.patch
)
set(ABSL_BUILD_TESTING OFF)
findorfetch(
USE_SYSTEM_PACKAGE
@@ -293,6 +296,8 @@ if(MUJOCO_BUILD_TESTS OR MUJOCO_BUILD_STUDIO OR MUJOCO_USE_FILAMENT)
TARGETS
absl::core_headers
EXCLUDE_FROM_ALL
PATCH_COMMAND
${ABSL_PATCH_COMMAND}
)
set(BUILD_TESTING
+11
View File
@@ -0,0 +1,11 @@
diff --git a/absl/base/options.h b/absl/base/options.h
--- a/absl/base/options.h
+++ b/absl/base/options.h
@@ -99,6 +99,6 @@
// the source location type is an alias of std::source_location type, use the
// feature macro ABSL_USES_STD_SOURCE_LOCATION.
//
-#define ABSL_OPTION_USE_STD_SOURCE_LOCATION 2
+#define ABSL_OPTION_USE_STD_SOURCE_LOCATION 0
// ABSL_OPTION_USE_STD_ORDERING