Skip to content

Conversation

jcfaracco
Copy link
Contributor

@jcfaracco jcfaracco commented Jan 31, 2025

This Pull Request is just a rebase on top of release 3.4.0.

For further reference of what this PR does, see the original #225.

If the original owner of the patch set retake the ownership of the changes, anyone can close this PR.

I kept the original owner of the patches/commits that apply cleanly.

ferdnyc and others added 6 commits January 31, 2025 00:46
- The local cmake/FindBpf.cmake module is used to discover an installed
  libbpf, unless the PROCDUMP_DISABLE_SYSTEM_LIBBPF option is enabled
- If system libbpf is disabled or not found, ExternalProject_Add is
  used to retrieve libbpf sources, build, (NEW: and install into
  PROJECT_BUILD_DIR/libbpf)
- `LANGUAGES C CXX` added to project() command (aids CMake discovery
  of parameters like correct library dir name)
- `GNUInstallDirs` CMake module loaded, defines CMAKE_INCLUDE_DIR
  and CMAKE_LIBRARY_DIR correctly relative to install prefix

Signed-off-by: Julio Faracco <[email protected]>
The repo's CMake Find module for Bpf includes the ability to discover
the location of the `bpftool` executable and provide an executable
target representing its location. Use that in commands to generate
the various procdump_ebpf files.

Also, split out the steps to generate files using bpftool into
separate add_custom_command() invocations, so that dependencies
between files are tracked and each output file will be automatically
tagged as `GENERATED` by CMake (and deleted by the 'clean' target).

Signed-off-by: Julio Faracco <[email protected]>
@jcfaracco
Copy link
Contributor Author

jcfaracco commented Jan 31, 2025

@kloczek do you have any suggestion about this PR? Feel free to do it. We can enhance the changes if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants