mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-18 08:41:31 +00:00
build: add MINIMAL_BUILD
option
Co-Authored-By: Lorenzo Fontana <fontanalorenz@gmail.com> Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
This commit is contained in:
parent
361fec452e
commit
9d88bfd0d4
@ -16,6 +16,7 @@ project(falco)
|
|||||||
|
|
||||||
option(USE_BUNDLED_DEPS "Bundle hard to find dependencies into the Falco binary" OFF)
|
option(USE_BUNDLED_DEPS "Bundle hard to find dependencies into the Falco binary" OFF)
|
||||||
option(BUILD_WARNINGS_AS_ERRORS "Enable building with -Wextra -Werror flags" OFF)
|
option(BUILD_WARNINGS_AS_ERRORS "Enable building with -Wextra -Werror flags" OFF)
|
||||||
|
option(MINIMAL_BUILD "Build a minimal version of Falco, containing only the engine and basic input/output" OFF)
|
||||||
|
|
||||||
# Elapsed time
|
# Elapsed time
|
||||||
# set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CMAKE_COMMAND} -E time") # TODO(fntlnz, leodido): add a flag to enable this
|
# set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CMAKE_COMMAND} -E time") # TODO(fntlnz, leodido): add a flag to enable this
|
||||||
@ -50,7 +51,11 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
||||||
|
|
||||||
set(CMAKE_COMMON_FLAGS "-Wall -ggdb ${DRAIOS_FEATURE_FLAGS}")
|
if(MINIMAL_BUILD)
|
||||||
|
set(MINIMAL_BUILD_FLAGS "-DMINIMAL_BUILD")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_COMMON_FLAGS "-Wall -ggdb ${DRAIOS_FEATURE_FLAGS} ${MINIMAL_BUILD_FLAGS}")
|
||||||
|
|
||||||
if(BUILD_WARNINGS_AS_ERRORS)
|
if(BUILD_WARNINGS_AS_ERRORS)
|
||||||
set(CMAKE_SUPPRESSED_WARNINGS
|
set(CMAKE_SUPPRESSED_WARNINGS
|
||||||
@ -221,11 +226,13 @@ include(sysdig)
|
|||||||
# Installation
|
# Installation
|
||||||
install(FILES falco.yaml DESTINATION "${FALCO_ETC_DIR}")
|
install(FILES falco.yaml DESTINATION "${FALCO_ETC_DIR}")
|
||||||
|
|
||||||
# Coverage
|
if(NOT MINIMAL_BUILD)
|
||||||
include(Coverage)
|
# Coverage
|
||||||
|
include(Coverage)
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Rules
|
# Rules
|
||||||
add_subdirectory(rules)
|
add_subdirectory(rules)
|
||||||
|
@ -34,6 +34,7 @@ case "$CMD" in
|
|||||||
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
-DBUILD_DRIVER="$BUILD_DRIVER" \
|
-DBUILD_DRIVER="$BUILD_DRIVER" \
|
||||||
|
-DMINIMAL_BUILD="$MINIMAL_BUILD" \
|
||||||
-DBUILD_BPF="$BUILD_BPF" \
|
-DBUILD_BPF="$BUILD_BPF" \
|
||||||
-DBUILD_WARNINGS_AS_ERRORS="$BUILD_WARNINGS_AS_ERRORS" \
|
-DBUILD_WARNINGS_AS_ERRORS="$BUILD_WARNINGS_AS_ERRORS" \
|
||||||
-DFALCO_VERSION="$FALCO_VERSION" \
|
-DFALCO_VERSION="$FALCO_VERSION" \
|
||||||
|
Loading…
Reference in New Issue
Block a user