From bcdd7f243e34aabc5232fda68d77508ff2edf7f6 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Thu, 7 Dec 2023 05:35:20 +0100 Subject: [PATCH] enfore folly as system headers this properly suppresses all warnings that happen within folly headers (e.g. openssl) --- CMake/resolve_dependency_modules/folly/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMake/resolve_dependency_modules/folly/CMakeLists.txt b/CMake/resolve_dependency_modules/folly/CMakeLists.txt index 2734a10b36f70..ffe09fb14b912 100644 --- a/CMake/resolve_dependency_modules/folly/CMakeLists.txt +++ b/CMake/resolve_dependency_modules/folly/CMakeLists.txt @@ -52,8 +52,14 @@ add_library(Folly::folly ALIAS folly) # The folly target does not contain any include directories, they are propagated # from folly_base. This marks them as system headers which should suppress # warnigs generated by them when they are included else where. -get_target_property(_inc folly_base INTERFACE_INCLUDE_DIRECTORIES) -target_include_directories(folly_base SYSTEM INTERFACE ${_inc}) +set_target_properties( + folly_deps + PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES + $) +set_target_properties( + folly_base + PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES + $) if(${gflags_SOURCE} STREQUAL "BUNDLED") add_dependencies(folly glog gflags_static fmt::fmt)