Skip to content

Commit

Permalink
Move gVisor engine to the bottom of CMakeLists.txt
Browse files Browse the repository at this point in the history
Makes it consistent in case we want to e.g. add custom defines
per arch.

Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
  • Loading branch information
gnosek authored and poiana committed Sep 12, 2022
1 parent da312e9 commit 1d8cb89
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions userspace/libscap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
include(FindMakedev)
endif()

# gVisor is currently only supported on Linux x86_64
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT MINIMAL_BUILD)
option(BUILD_LIBSCAP_GVISOR "Build gVisor support" ON)
if (BUILD_LIBSCAP_GVISOR)
add_definitions(-DHAS_ENGINE_GVISOR)
add_subdirectory(engine/gvisor)
target_link_libraries(scap scap_engine_gvisor)
endif()
endif()

option(CREATE_TEST_TARGETS "Enable make-targets for unit testing" ON)

if(CREATE_TEST_TARGETS AND NOT WIN32)
Expand Down Expand Up @@ -210,3 +200,13 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
endif()

endif()

# gVisor is currently only supported on Linux x86_64
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT MINIMAL_BUILD)
option(BUILD_LIBSCAP_GVISOR "Build gVisor support" ON)
if (BUILD_LIBSCAP_GVISOR)
add_definitions(-DHAS_ENGINE_GVISOR)
add_subdirectory(engine/gvisor)
target_link_libraries(scap scap_engine_gvisor)
endif()
endif()

0 comments on commit 1d8cb89

Please sign in to comment.