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 <cristian.adam@qt.io>
This commit is contained in:
David Schulz
2019-12-19 09:52:24 +01:00
parent 2de52cffb1
commit 8f9ff0c640

View File

@@ -98,6 +98,12 @@ endif()
install(TARGETS OptionalSvg EXPORT QtCreator) install(TARGETS OptionalSvg EXPORT QtCreator)
find_package(Clang COMPONENTS libclang QUIET) 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) find_package(LLVM QUIET)
if (APPLE) if (APPLE)