v31.1-roots.1 · Commit 14: [PATCH 14/17] fix(build): retain implicit Homebrew system header flags
cmake/module/AddBoostIfNeeded.cmake
Before: cmake/module/AddBoostIfNeeded.cmake · After: cmake/module/AddBoostIfNeeded.cmake
File metadata
index 606894d2a61b1a2796164032c51ebcce294fd0e4..ff742822c103815008768ca0449a198115be35d6 100644
Download original patch · Release notes
Diff rows 1–12 of 12. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
cmake/module/AddBoostIfNeeded.cmake
CHANGED
|
@@ -50,6 +50,12 @@ function(add_boost_if_needed)
|
|
|
50
50
|
file(REAL_PATH "${_boost_include_dir}/boost" _configured_boost_headers)
|
|
51
51
|
if(_linked_boost_headers STREQUAL _configured_boost_headers)
|
|
52
52
|
target_include_directories(Boost::headers SYSTEM INTERFACE "${_homebrew_prefix}/include")
|
|
53
|
+
# CMake filters implicit include directories from generated include
|
|
54
|
+
# flags. Retain the system classification even when this alias is
|
|
55
|
+
# an implicit compiler search path.
|
|
56
|
+
target_compile_options(Boost::headers INTERFACE
|
|
57
|
+
"$<$<COMPILE_LANGUAGE:CXX>:SHELL:-isystem \"${_homebrew_prefix}/include\">"
|
|
58
|
+
)
|
|
53
59
|
message(STATUS "Using matching Homebrew Boost header alias: ${_homebrew_prefix}/include")
|
|
54
60
|
break()
|
|
55
61
|
endif()
|