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

fix(build): don't write to source directory during build #1034

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion driver/bpf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# MIT.txt or GPL.txt for full copies of the license.
#

configure_file(../driver_config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/../driver_config.h)
configure_file(../driver_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/driver_config.h)

option(BUILD_BPF "Build the BPF driver on Linux" OFF)

Expand All @@ -28,6 +28,7 @@ endif()
install(FILES
bpf_helpers.h
builtins.h
driver_config.h
filler_helpers.h
fillers.h
Makefile
Expand Down
2 changes: 1 addition & 1 deletion driver/bpf/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ or GPL2.txt for full copies of the license.
#endif
#include <linux/sched.h>

#include "../driver_config.h"
#include "driver_config.h"
#include "../ppm_events_public.h"
#include "bpf_helpers.h"
#include "types.h"
Expand Down
3 changes: 2 additions & 1 deletion driver/modern_bpf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if(RESULT STREQUAL NOTFOUND)
message(FATAL_ERROR "${MODERN_BPF_LOG_PREFIX} problem with compute_versions.cmake in ${CMAKE_MODULE_PATH}")
endif()
compute_versions(../API_VERSION ../SCHEMA_VERSION)
configure_file(../driver_config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/../driver_config.h)
configure_file(../driver_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/driver/driver_config.h)

########################
# Check clang version.
Expand Down Expand Up @@ -211,6 +211,7 @@ list(APPEND CLANG_FLAGS
-I${LIBBPF_INCLUDE}
${MODERN_PROBE_INCLUDE}
-I${PPM_INCLUDE}
-I${CMAKE_CURRENT_BINARY_DIR}
-isystem
)

Expand Down