File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ find_path (BPF_INCLUDE_DIR bpf/bpf.h )
2+ find_library (BPF_LIBRARY NAMES bpf )
3+
4+ include (FindPackageHandleStandardArgs )
5+ find_package_handle_standard_args (BPF DEFAULT_MSG BPF_LIBRARY BPF_INCLUDE_DIR)
6+
7+ if (BPF_FOUND)
8+ set (BPF_LIBRARIES ${BPF_LIBRARY} )
9+ set (BPF_INCLUDE_DIRS ${BPF_INCLUDE_DIR} )
10+ else ()
11+ set (BPF_LIBRARIES)
12+ set (BPF_INCLUDE_DIRS)
13+ endif ()
14+
15+ mark_as_advanced (BPF_LIBRARIES BPF_INCLUDE_DIRS )
Original file line number Diff line number Diff line change @@ -271,6 +271,10 @@ if (APPLE)
271271 find_library (KERBEROS_LIB NAMES gssapi_krb5 )
272272endif ()
273273
274+ if (LINUX )
275+ find_package (Bpf REQUIRED )
276+ endif ()
277+
274278# This is required by Homebrew's libc. See
275279# https://github.com/facebook/hhvm/pull/5728#issuecomment-124290712
276280# for more info.
@@ -332,6 +336,10 @@ macro(hphp_link target)
332336 target_link_libraries (${target} ${VISIBILITY} ${CURL_LIBRARIES} )
333337 target_link_libraries (${target} ${VISIBILITY} glog )
334338
339+ if (LINUX )
340+ target_link_libraries (${target} ${VISIBILITY} ${BPF_LIBRARIES} )
341+ endif ()
342+
335343 if (LIBINOTIFY_LIBRARY)
336344 target_link_libraries (${target} ${VISIBILITY} ${LIBINOTIFY_LIBRARY} )
337345 endif ()
You can’t perform that action at this time.
0 commit comments