Skip to content

Commit

Permalink
Ignore maybe-uninitialised on MacOS with GCC >= 11
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns authored and saghul committed Jul 1, 2024
1 parent e8ef9d6 commit b9de2b0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ if(MSVC)
xcheck_add_c_compiler_flag(/experimental:c11atomics)
endif()

# MacOS and GCC 11 or later need -Wno-maybe-uninitialized
# https://github.com/quickjs-ng/quickjs/issues/453
if(APPLE AND CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 11)
xcheck_add_c_compiler_flag(-Wno-maybe-uninitialized)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "WASI")
add_compile_definitions(
_WASI_EMULATED_PROCESS_CLOCKS
Expand Down

0 comments on commit b9de2b0

Please sign in to comment.