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/cmake | |
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/cmake')
-rw-r--r-- | src/cmake/plugin.cmake | 6 |
1 files changed, 5 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) |