Skip to content

Commit

Permalink
Added Clang 14 fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
klaussilveira committed Oct 6, 2023
1 parent 13f2ff3 commit 77c22ce
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 @@ -176,6 +176,12 @@ if (URHO3D_MACOSX_BUNDLE OR (APPLE AND ARM))
endif ()
endif ()

# Clang >= 14 warns even if you compile with -std=c99 or -std=gnu99
check_c_compiler_flag(-Wdeclaration-after-statement HAVE_DECLARATION_AFTER_STATEMENT_WARNING)
if (HAVE_DECLARATION_AFTER_STATEMENT_WARNING)
add_definitions(-Wno-declaration-after-statement)
endif()

# Setup SDK-like include dir in the build tree for building the Urho3D library
set (THIRD_PARTY_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${DEST_INCLUDE_DIR}/ThirdParty)
file (MAKE_DIRECTORY ${THIRD_PARTY_INCLUDE_DIR})
Expand Down

0 comments on commit 77c22ce

Please sign in to comment.