[CMAKE] Some options are only supported by GCC, don't use them for clang

These are (so far):
-Wno-format-overflow
-Wno-nonnull-compare
-Wno-old-style-declaration
-Wno-unused-but-set-variable
This commit is contained in:
Victor Perevertkin 2021-04-09 03:58:19 +03:00
parent 959729f6ee
commit 74ec94e12c
35 changed files with 99 additions and 57 deletions

View file

@ -103,9 +103,10 @@ else()
target_compile_options(ext2fs PRIVATE
-Wno-pointer-sign -Wno-unused-function
-Wno-unused-variable -Wno-missing-braces)
if (NOT CLANG)
target_compile_options(ext2fs PRIVATE -Wno-unused-but-set-variable)
endif()
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options(ext2fs PRIVATE -Wno-unused-but-set-variable)
endif()
if(CLANG)