From 8f9ff0c640b34d45a0ecba10b015ebf64d7bce45 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 19 Dec 2019 09:52:24 +0100 Subject: CMake build: disable some warnings for build against llvm Add the same ignore warning flags to the compiler as in clang_installation.pri Change-Id: Ieb3f6ac861cba60b6c7fb3c74e4c9b46a62d22b9 Reviewed-by: Cristian Adam --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e29d793d7f..75ddf7ff9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,6 +98,12 @@ endif() install(TARGETS OptionalSvg EXPORT QtCreator) find_package(Clang COMPONENTS libclang QUIET) +# silence a lot of warnings from building against llvm +# this would better fit inside a central libclang detection/include cmake file, but since we do not +# have one put it temporary here +if(MSVC AND TARGET libclang) + target_compile_options(libclang INTERFACE /wd4100 /wd4141 /wd4146 /wd4244 /wd4267 /wd4291) +endif() find_package(LLVM QUIET) if (APPLE) -- cgit v1.2.1