Skip to content

Commit

Permalink
enfore folly as system headers
Browse files Browse the repository at this point in the history
this properly suppresses all warnings that happen within folly headers (e.g. openssl)
  • Loading branch information
assignUser committed Dec 7, 2023
1 parent 1587233 commit bcdd7f2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions CMake/resolve_dependency_modules/folly/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<TARGET_PROPERTY:folly_deps,INTERFACE_INCLUDE_DIRECTORIES>)
set_target_properties(
folly_base
PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
$<TARGET_PROPERTY:folly_base,INTERFACE_INCLUDE_DIRECTORIES>)

if(${gflags_SOURCE} STREQUAL "BUNDLED")
add_dependencies(folly glog gflags_static fmt::fmt)
Expand Down

0 comments on commit bcdd7f2

Please sign in to comment.