Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable build and test outside src dir #685

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ veristat_scheduler = get_option('veristat_scheduler')

veristat_diff_dir = get_option('veristat_diff_dir')

build_outside_src = get_option('build_outside_src')

if enable_stress
run_stress_tests = find_program(join_paths(meson.current_source_dir(),
'meson-scripts/run_stress_tests'))
Expand Down Expand Up @@ -121,7 +123,11 @@ if should_build_libbpf

foreach path : libbpf_header_paths
libbpf_h += ['@0@'.format(libbpf_path) + path]
libbpf_local_h += ['.@0@/libbpf'.format(local_build_path) + path]
if not build_outside_src
libbpf_local_h += ['.@0@/libbpf'.format(local_build_path) + path]
else
libbpf_local_h += ['@0@/libbpf'.format(local_build_path) + path]
endif
endforeach

message('Fetching libbpf repo')
Expand Down
6 changes: 6 additions & 0 deletions meson.options
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ option(
value: 'auto',
description: 'install pacman hooks'
)
option(
'build_outside_src',
type: 'boolean',
value: false,
description: 'enable build cmds to work outside of src dir',
)
Loading