Skip to content

Commit a2fd558

Browse files
committed
Merge bitcoin#34572: cmake: Fix NetBSD-specific workaround for Boost
79c934b cmake: Fix NetBSD-specific workaround for Boost (Hennadii Stepanov) Pull request description: The recently merged bitcoin#34143 broke builds with depends on NetBSD due to a workaround introduced in 5a5ddbd. The upstream [bug](https://gnats.netbsd.org/59856) has been fixed, and the entire workaround can be removed once the fixed Boost package becomes generally available. However, it seems prudent to amend the workaround now to have it workable in the 31.0 release. Here are CI runs: - broken: https://github.com/hebasto/bitcoin-core-nightly/actions/runs/21933683654 - fixed: https://github.com/hebasto/bitcoin-core-nightly/actions/runs/21933683654 ACKs for top commit: fanquake: ACK 79c934b Tree-SHA512: 360e4943fbedc7692fa2eba48f3375fc927d3aaef178dec6c0fafd3addfad0c89db9d1fe88e214313ebd285584bf8dc7d7b0a3a41d905c7f3d28293aa743405a
2 parents cb3473a + 79c934b commit a2fd558

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

cmake/module/AddBoostIfNeeded.cmake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ function(add_boost_if_needed)
3232
find_package(Boost 1.74.0 REQUIRED CONFIG)
3333
mark_as_advanced(Boost_INCLUDE_DIR boost_headers_DIR)
3434
# Workaround for a bug in NetBSD pkgsrc.
35-
# See: https://github.com/NetBSD/pkgsrc/issues/167.
35+
# See https://gnats.netbsd.org/59856.
3636
if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
3737
get_filename_component(_boost_include_dir "${boost_headers_DIR}/../../../include/" ABSOLUTE)
38-
set_target_properties(Boost::headers PROPERTIES
39-
INTERFACE_INCLUDE_DIRECTORIES ${_boost_include_dir}
40-
)
38+
if(_boost_include_dir MATCHES "^/usr/pkg/")
39+
set_target_properties(Boost::headers PROPERTIES
40+
INTERFACE_INCLUDE_DIRECTORIES ${_boost_include_dir}
41+
)
42+
endif()
4143
unset(_boost_include_dir)
4244
endif()
4345
set_target_properties(Boost::headers PROPERTIES IMPORTED_GLOBAL TRUE)

0 commit comments

Comments
 (0)