Fix GCC and MSVC build.

PiperOrigin-RevId: 564390190
Change-Id: Icba3eefb394b8d17798679dd9876f127fba5a599
This commit is contained in:
Saran Tunyasuvunakool
2023-09-11 08:16:20 -07:00
committed by Copybara-Service
parent 78183e60e1
commit 860f7b376a
4 changed files with 11 additions and 17 deletions
+1 -4
View File
@@ -99,12 +99,9 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# Set -Wimplicit-fallthrough=5 to only allow fallthrough annotation via __attribute__.
set(EXTRA_COMPILE_OPTIONS ${EXTRA_COMPILE_OPTIONS} -Wimplicit-fallthrough=5
-Wno-maybe-uninitialized -Wno-c++20-extensions
-Wno-maybe-uninitialized
)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(EXTRA_COMPILE_OPTIONS ${EXTRA_COMPILE_OPTIONS} -Wno-c++20-designator)
endif()
endif()
include(MujocoHarden)