Skip to content

Commit

Permalink
fix(build): don't write to source directory during build
Browse files Browse the repository at this point in the history
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
  • Loading branch information
gnosek committed Sep 11, 2023
1 parent 92d0574 commit 73e3ff3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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
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

0 comments on commit 73e3ff3

Please sign in to comment.