build: plugin disable vat2 test2 plugin build
A plugin can set "VAT_AUTO_TEST_ OFF" to disable building of the autogenerated
Type: improvement
Change-Id: I856fbfd83bbc5c7df0759e550b20ac75df77d9d7
Signed-off-by: Ole Troan <otroan@employees.org>
diff --git a/src/cmake/plugin.cmake b/src/cmake/plugin.cmake
index b399470..4997d9a 100644
--- a/src/cmake/plugin.cmake
+++ b/src/cmake/plugin.cmake
@@ -15,7 +15,7 @@
cmake_parse_arguments(PLUGIN
""
"LINK_FLAGS;COMPONENT;DEV_COMPONENT"
- "SOURCES;API_FILES;MULTIARCH_SOURCES;MULTIARCH_FORCE_ON;LINK_LIBRARIES;INSTALL_HEADERS;API_TEST_SOURCES;"
+ "SOURCES;API_FILES;MULTIARCH_SOURCES;MULTIARCH_FORCE_ON;LINK_LIBRARIES;INSTALL_HEADERS;API_TEST_SOURCES;VAT_AUTO_TEST"
${ARGN}
)
set(plugin_name ${name}_plugin)
@@ -108,7 +108,7 @@
COMPONENT ${PLUGIN_COMPONENT}
)
endif()
- if (PLUGIN_API_FILES)
+ if (PLUGIN_API_FILES AND NOT PLUGIN_VAT_AUTO_TEST STREQUAL OFF)
add_vpp_test_library(${name}_test_plugin ${PLUGIN_API_FILES})
endif()