Skip to content

Commit

Permalink
feat(cmake): selectively disable bpf and kmod engines
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <[email protected]>
  • Loading branch information
therealbobo committed Jan 25, 2024
1 parent 77dc7de commit 662e676
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cmake/modules/engine_config.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
option(CREATE_TEST_TARGETS "Enable make-targets for unit testing" ON)
option(ENABLE_ENGINE_KMOD "Enable kernel module engine" ON)
option(ENABLE_ENGINE_BPF "Enable bpf engine" ON)

if(CREATE_TEST_TARGETS)
# Add engine only used for testing
Expand All @@ -8,10 +10,16 @@ endif()
set(HAS_ENGINE_NODRIVER On)
set(HAS_ENGINE_SAVEFILE On)
set(HAS_ENGINE_SOURCE_PLUGIN On)
set(HAS_ENGINE_KMOD Off)
set(HAS_ENGINE_BPF Off)

if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(HAS_ENGINE_KMOD On)
set(HAS_ENGINE_BPF On)
if(ENABLE_ENGINE_KMOD)
set(HAS_ENGINE_KMOD On)
endif()
if(ENABLE_ENGINE_BPF)
set(HAS_ENGINE_BPF On)
endif()

option(BUILD_LIBSCAP_MODERN_BPF "Enable modern bpf probe" OFF)
if(BUILD_LIBSCAP_MODERN_BPF)
Expand Down

0 comments on commit 662e676

Please sign in to comment.