Disable -Wmaybe-uninitialized in GCC versions 12 and later.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109561 PiperOrigin-RevId: 569204628 Change-Id: I34ccb84a0afc60ccfcc47c820438d15dfa0a5f42
This commit is contained in:
committed by
Copybara-Service
parent
107b76490a
commit
8e00f8029e
@@ -311,6 +311,11 @@ macro(mujoco_pybind11_module name)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
# Only allow fallthrough annotation via __attribute__.
|
||||
target_compile_options(${name} PRIVATE -Wimplicit-fallthrough=5)
|
||||
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109561
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 11)
|
||||
target_compile_options(${name} PRIVATE -Wno-maybe-uninitialized)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
Reference in New Issue
Block a user