summaryrefslogtreecommitdiffstats
path: root/src/cmake/library.cmake
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-09-14 18:54:45 -0700
committerOle Tr�an <otroan@employees.org>2021-09-27 07:04:51 +0000
commit248210c6ca1716ee2c5e6c974051218930fa4c26 (patch)
tree5c4e8e1c53800e8ec43da7a8dbc4fbe73e5c9672 /src/cmake/library.cmake
parent1b6c7932a8feb419aae73a00a6784d7c110decdc (diff)
misc: move part of vpe apis to vlibmemory
VPE apis are actually vlib apis. This moves those that are not tightly coupled with vapi to vlib_api Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I456a64ce49a0cdeff4a0931c6ea513cb639f683e Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/cmake/library.cmake')
-rw-r--r--src/cmake/library.cmake30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/cmake/library.cmake b/src/cmake/library.cmake
index d19eb3c80cc..c80d7f226d6 100644
--- a/src/cmake/library.cmake
+++ b/src/cmake/library.cmake
@@ -108,6 +108,36 @@ function (add_vpp_headers path)
endforeach()
endfunction()
+macro(add_vat_test_library lib)
+ cmake_parse_arguments(TEST
+ ""
+ ""
+ ${ARGN}
+ )
+
+ foreach(file ${ARGN})
+ get_filename_component(name ${file} NAME_WE)
+ set(test_lib ${lib}_${name}_plugin)
+ add_library(${test_lib} SHARED ${file})
+ target_compile_options(${test_lib} PUBLIC ${VPP_DEFAULT_MARCH_FLAGS})
+ if(NOT VPP_EXTERNAL_PROJECT)
+ add_dependencies(${test_lib} api_headers)
+ endif()
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+ set_target_properties(${test_lib} PROPERTIES NO_SONAME 1)
+ set_target_properties(${test_lib} PROPERTIES
+ PREFIX ""
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/vpp_api_test_plugins)
+
+ # install .so
+ install(
+ TARGETS ${test_lib}
+ DESTINATION ${VPP_LIBRARY_DIR}/vpp_api_test_plugins
+ COMPONENT ${ARG_COMPONENT}
+ )
+ endforeach()
+endmacro()
+
macro(add_vpp_test_library lib)
cmake_parse_arguments(TEST
""