[CMAKE/CLANG-CL] Silence some clang-cl warnings in consistency with our gcc build.

This commit is contained in:
Amine Khaldi 2017-12-03 23:30:10 +01:00
parent 6fe9441d32
commit 00124d1b1a
29 changed files with 113 additions and 82 deletions

View file

@ -78,10 +78,11 @@ list(APPEND SOURCE
add_library(reiserfs SHARED ${SOURCE} src/rfsd.rc)
if(NOT MSVC)
add_target_compile_flags(reiserfs "-Wno-pointer-sign -Wno-unused-function")
if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_target_compile_flags(reiserfs "-Wno-unused-but-set-variable -Wno-unused-variable -Wno-missing-braces -D__GCC__")
if(USE_CLANG_CL OR (NOT MSVC))
add_target_compile_flags(reiserfs "-Wno-missing-braces -Wno-pointer-sign")
add_target_compile_flags(reiserfs "-Wno-unused-function -Wno-unused-variable")
if(NOT USE_CLANG_CL)
add_target_compile_flags(reiserfs "-Wno-unused-but-set-variable -D__GCC__")
endif()
else()
#disable warnings: "unreferenced local variable", "initialized, but not used variable", "benign include"