]> The Tcpdump Group git mirrors - libpcap/commit
Tame -Wall on MSVC and improve Clang/C2 support 682/head
authorAli Abdulkadir <[email protected]>
Mon, 19 Mar 2018 19:55:58 +0000 (22:55 +0300)
committerAli Abdulkadir <[email protected]>
Mon, 19 Mar 2018 19:56:15 +0000 (22:56 +0300)
commit74fabc32bacfd4fbd7960a6fd6bc1d0ecefecf6a
tree6dea1860b72454461df7fbf1cb3b9f38afa375b8
parent55225fde23eb409d04eda00a453c0529d5afbb20
Tame -Wall on MSVC and improve Clang/C2 support

MSVC's -Wall has more in common with clang's -Weverthing than gcc's -Wall. The result is very overwhelming (3000+ lines of warnings).
From now on, if building with MSVC *and* if a a .devel is found *and* if MSVC is not using clang as it's front end, increase the warning level to 4. Else do the regular  check_and_add_compiler_option() routine.

It is probably also worth noticing that cmake's compiler identification string for LLVM/Clang is *not* true when using the Clang/C2 toolset. Only something like `if(MSVC AND NOT ${CMAKE_C_COMPILER} MATCHES "clang*")` or `if(CMAKE_GENERATOR_TOOLSET STREQUAL "v140_clang_3_7")` can detect it.
CMakeLists.txt
optimize.c