[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

@ -22,9 +22,10 @@ list(APPEND SOURCE
src/internal.h)
add_library(adns ${SOURCE})
add_dependencies(adns psdk)
add_pch(adns src/internal.h SOURCE)
if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang"))
if(NOT MSVC)
add_target_compile_flags(adns "-Wno-unused-but-set-variable")
endif()
add_dependencies(adns psdk)
add_pch(adns src/internal.h SOURCE)

View file

@ -16,9 +16,10 @@ list(APPEND SOURCE
cardlib.h)
add_library(cardlib ${SOURCE})
add_dependencies(cardlib psdk)
add_pch(cardlib cardlib.h SOURCE)
if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang"))
if(NOT MSVC)
add_target_compile_flags(cardlib "-Wno-unused-but-set-variable")
endif()
add_dependencies(cardlib psdk)
add_pch(cardlib cardlib.h SOURCE)

View file

@ -63,11 +63,8 @@ list(APPEND SOURCE
libxml.h)
add_library(libxml2 ${SOURCE})
target_link_libraries(libxml2 oldnames)
add_pch(libxml2 libxml.h SOURCE)
add_dependencies(libxml2 psdk)
if(MSVC)
if(MSVC AND (NOT USE_CLANG_CL))
# Formal parameter different from declaration
add_target_compile_flags(libxml2 "/wd4101")
# Local variable initialized but not referenced
@ -75,3 +72,7 @@ if(MSVC)
else()
add_target_compile_flags(libxml2 "-w")
endif()
target_link_libraries(libxml2 oldnames)
add_pch(libxml2 libxml.h SOURCE)
add_dependencies(libxml2 psdk)