diff options
author | Damjan Marion <damarion@cisco.com> | 2024-03-15 19:03:41 +0000 |
---|---|---|
committer | Mohammed HAWARI <momohawari@gmail.com> | 2024-03-18 16:01:25 +0000 |
commit | 8799bf6ca6b78321049bbc397256dd8b3884d829 (patch) | |
tree | 6b21dc01c709d941382c32fae3ff3537d4e9c66d /src | |
parent | 99c317a6066f825af002ca0c18caaef337ef0bcb (diff) |
build: add option to specify supported OS list for plugin
Type: improvement
Change-Id: I0d6f11d5ece19c5e0e00dfdadc9d4c09274ae8e1
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/cmake/plugin.cmake | 6 | ||||
-rw-r--r-- | src/plugins/af_packet/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/plugins/af_xdp/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/plugins/dma_intel/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/plugins/perfmon/CMakeLists.txt | 2 |
5 files changed, 13 insertions, 1 deletions
diff --git a/src/cmake/plugin.cmake b/src/cmake/plugin.cmake index 4997d9a4420..df96aa8765f 100644 --- a/src/cmake/plugin.cmake +++ b/src/cmake/plugin.cmake @@ -15,9 +15,13 @@ macro(add_vpp_plugin name) cmake_parse_arguments(PLUGIN "" "LINK_FLAGS;COMPONENT;DEV_COMPONENT" - "SOURCES;API_FILES;MULTIARCH_SOURCES;MULTIARCH_FORCE_ON;LINK_LIBRARIES;INSTALL_HEADERS;API_TEST_SOURCES;VAT_AUTO_TEST" + "SOURCES;API_FILES;MULTIARCH_SOURCES;MULTIARCH_FORCE_ON;LINK_LIBRARIES;INSTALL_HEADERS;API_TEST_SOURCES;VAT_AUTO_TEST;SUPPORTED_OS_LIST" ${ARGN} ) + if (PLUGIN_SUPPORTED_OS_LIST AND NOT ${CMAKE_SYSTEM_NAME} IN_LIST PLUGIN_SUPPORTED_OS_LIST) + message(WARNING "unsupported OS - ${name} plugin disabled") + return() + endif() set(plugin_name ${name}_plugin) set(api_includes) if(NOT PLUGIN_COMPONENT) diff --git a/src/plugins/af_packet/CMakeLists.txt b/src/plugins/af_packet/CMakeLists.txt index 4b79615cae7..818a03107d7 100644 --- a/src/plugins/af_packet/CMakeLists.txt +++ b/src/plugins/af_packet/CMakeLists.txt @@ -33,4 +33,6 @@ add_vpp_plugin(af_packet # API_TEST_SOURCES #af_packet_test_api.c + + SUPPORTED_OS_LIST Linux ) diff --git a/src/plugins/af_xdp/CMakeLists.txt b/src/plugins/af_xdp/CMakeLists.txt index 1097358799b..fd7ee4e835b 100644 --- a/src/plugins/af_xdp/CMakeLists.txt +++ b/src/plugins/af_xdp/CMakeLists.txt @@ -70,4 +70,6 @@ add_vpp_plugin(af_xdp ${BPF_LIB} ${ELF_LIB} ${Z_LIB} + + SUPPORTED_OS_LIST Linux ) diff --git a/src/plugins/dma_intel/CMakeLists.txt b/src/plugins/dma_intel/CMakeLists.txt index 8fd8cd1933f..b683036f7e3 100644 --- a/src/plugins/dma_intel/CMakeLists.txt +++ b/src/plugins/dma_intel/CMakeLists.txt @@ -6,4 +6,6 @@ add_vpp_plugin(dma_intel dsa.c format.c main.c + + SUPPORTED_OS_LIST Linux ) diff --git a/src/plugins/perfmon/CMakeLists.txt b/src/plugins/perfmon/CMakeLists.txt index 8e3ab1b3e32..d820eb2f37e 100644 --- a/src/plugins/perfmon/CMakeLists.txt +++ b/src/plugins/perfmon/CMakeLists.txt @@ -62,4 +62,6 @@ add_vpp_plugin(perfmon COMPONENT vpp-plugin-devtools + + SUPPORTED_OS_LIST Linux ) |