Skip to content

Commit

Permalink
Try different way to pass -Wno-restrict
Browse files Browse the repository at this point in the history
  • Loading branch information
kmabeeTT committed Jan 22, 2025
1 parent 86caa0f commit c287bac
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ CPMAddPackage(
"FLATBUFFERS_BUILD_TESTS OFF"
"FLATBUFFERS_SKIP_MONSTER_EXTRA ON"
"FLATBUFFERS_STRICT_MODE ON"
"FLATBUFFERS_CXX_FLAGS=-Wno-restrict"
"CMAKE_POSITION_INDEPENDENT_CODE ON"
)

if(flatbuffers_ADDED)
# Apply the desired compiler options to FlatBuffers targets
message(STATUS "KCM FlatBuffers package was successfully added. Applying custom compiler options.")
target_compile_options(flatc PRIVATE -Wno-restrict)
target_compile_options(flatbuffers PRIVATE -Wno-restrict)
endif()

0 comments on commit c287bac

Please sign in to comment.