summaryrefslogtreecommitdiffstats
path: root/src/vat2/CMakeLists.txt
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2020-12-04 13:15:30 +0100
committerPaul Vinciguerra <pvinci@vinciconsulting.com>2020-12-11 22:54:09 +0000
commit793be46324453e5326eb37a13ffb82f92b1f55b1 (patch)
tree4a7932b5ccfce018a97c8e75e8a9aa1c16f18e15 /src/vat2/CMakeLists.txt
parent6c8cdf78b47494f98ac0d6dac8c736467f4afc55 (diff)
api: fromjson/tojson enum flag support
Represent enum flags as JSON arrays (as these can have multiple values). Add unit tests. Type: improvement Change-Id: I680c5b6f76ef6f05f360e2f3b9c4cbb927e15d7d Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vat2/CMakeLists.txt')
-rw-r--r--src/vat2/CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/vat2/CMakeLists.txt b/src/vat2/CMakeLists.txt
index 690267c6113..73538b4a2dd 100644
--- a/src/vat2/CMakeLists.txt
+++ b/src/vat2/CMakeLists.txt
@@ -31,6 +31,29 @@ add_vpp_executable(vat2 ENABLE_EXPORTS NO_INSTALL
rt m dl crypto
)
+#
+# Unit test code. Call generator directly to avoid it being installed
+#set_source_files_properties(vat2_test.c PROPERTIES
+# COMPILE_FLAGS " -fsanitize=address"
+#)
+
+vpp_generate_api_c_header (test/vat2_test.api)
+add_vpp_executable(test_vat2 ENABLE_EXPORTS NO_INSTALL
+ SOURCES
+ test/vat2_test.c
+ jsonconvert.c
+
+ DEPENDS api_headers
+
+ LINK_LIBRARIES
+ vlibmemoryclient
+ svm
+ vppinfra
+ vppapiclient
+ Threads::Threads
+ rt m dl crypto
+)
+#target_link_options(test_vat2 PUBLIC "LINKER:-fsanitize=address")
##############################################################################
# vat2 headers
##############################################################################