Skip to content

Commit

Permalink
chore(cmake): move kmod/bpf options under linux
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
  • Loading branch information
therealbobo committed Jan 25, 2024
1 parent 662e676 commit 9b9a713
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions cmake/modules/engine_config.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
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 @@ -10,16 +8,13 @@ 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")
if(ENABLE_ENGINE_KMOD)
set(HAS_ENGINE_KMOD On)
endif()
if(ENABLE_ENGINE_BPF)
set(HAS_ENGINE_BPF On)
endif()
option(ENABLE_ENGINE_KMOD "Enable kernel module engine" ON)
option(ENABLE_ENGINE_BPF "Enable bpf engine" ON)

set(HAS_ENGINE_KMOD ${ENABLE_ENGINE_KMOD})
set(HAS_ENGINE_BPF ${ENABLE_ENGINE_BPF})

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

0 comments on commit 9b9a713

Please sign in to comment.