summaryrefslogtreecommitdiffstats
path: root/src/cmake/library.cmake
AgeCommit message (Collapse)AuthorFilesLines
2020-11-25api: vat2 and json autogeneration for api messagesOle Troan1-0/+32
VAT2: A completely auto-generated replacement of VAT. Reads input message in JSON from stdin and outputs received messages in JSON. A VAT2 plugin is automatically built for a .api file. There no longer a need for a separate _test.c. Example: vat2 show_version {} { "_msgname": "show_version_reply", "retval": 0, "program": "vpe", "version": "21.01-rc0~411-gf6eb348a6", "build_date": "2020-11-19T09:49:25", "build_directory": "/vpp/autogen3" } vat2 sw_interface_dump '{"sw_if_index": -1, "name_filter_valid": 0, "name_filter": ""}' [{ "_msgname": "sw_interface_details", "sw_if_index": 0, "sup_sw_if_index": 0, "l2_address": "00:00:00:00:00:00", "flags": "Invalid ENUM", "type": "IF_API_TYPE_HARDWARE", "link_duplex": "LINK_DUPLEX_API_UNKNOWN", "link_speed": 0, "link_mtu": 0, "mtu": [0, 0, 0, 0], "sub_id": 0, "sub_number_of_tags": 0, "sub_outer_vlan_id": 0, "sub_inner_vlan_id": 0, "sub_if_flags": "Invalid ENUM", "vtr_op": 0, "vtr_push_dot1q": 0, "vtr_tag1": 0, "vtr_tag2": 0, "outer_tag": 0, "b_dmac": "00:00:00:00:00:00", "b_smac": "00:00:00:00:00:00", "b_vlanid": 0, "i_sid": 0, "interface_name": "local0", "interface_dev_type": "local", "tag": "" }] This is the first phase and vat2 is not integrated in packaging yet. Type: feature Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ib45ddeafb180ea7da8c5dc274a9274d7a4edc876 Signed-off-by: Ole Troan <ot@cisco.com>
2020-11-05build: link time optimization for release buildsDamjan Marion1-1/+8
Type: improvement Change-Id: I0e24f1d2ad5c7a11a8bd40125428f86aca867bec Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-15build: forward dependencies to arch-specific libsAloys Augustin1-1/+1
Without this, if a multiarch source depends on a generated api header for instance, the build would be racy between the api header generation and the multiarch object compilation. Type: improvement Signed-off-by: Aloys Augustin <aloaugus@cisco.com> Change-Id: I08fcd0e5a1c51398ac1a8f37cf6562064b400d4a
2020-05-08build: various improvementsDamjan Marion1-1/+1
- add option to install only host tools - add option to specify lib and runtime dir Type: improvement Change-Id: I6356b52df459120fc9b0127948bae7679fb10e52 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-12-17build: export vapi generation in vpp-devOliver Giles1-1/+1
Adds the higher-level vapi generation to cmake/api.cmake and exposes the necessary python scripts in vpp-dev, so that out-of-tree/downstream plugins can also leverage the more convenient API. Type: feature Signed-off-by: Oliver Giles <oliver_g@radwin.com> Change-Id: I8c40a14d27ba3cb972c6907632e03c0e7b0ce982
2019-09-25api: split api generated filesOle Troan1-0/+2
Split generation of API message enum and the typedefs into separate files, so that the type file can be included from elsewhere. Generate a C file for VPP that contains the API registration, this was previously done via X macros by the C pre- processor. This allows deleting lots of skeleton/copy paste code for each feature. plugins/flowprobe plugins/map examples/sample-plugin vnet/ipip used as Guinea pigs. Generate a C Test file for VAT, that does the same for VAT plugins. Also add support for a per-message CLI option, that is currently limited to VAT help text. option vat_help = "<help text>"; Type: refactor Change-Id: I245e3104bb76f7e1fb69a59ab20cc7c8dfcdd460 Signed-off-by: Ole Troan <ot@cisco.com>
2019-07-25build: package .api files in vpp-devBenoît Ganne1-1/+1
Type: fix Change-Id: I035ff638d346109e1b3b5e5a8cdd36d650c45e5e Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-06-07build: add -Wall and -fno-common, fix reported issuesBenoît Ganne1-1/+0
Type: refactor Change-Id: I8489ccd54411c2aa9355439c5641dc31012c64a2 Signed-off-by: Benoît Ganne <bganne@cisco.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-14Add -fno-common compile optionBenoît Ganne1-1/+1
-fno-common makes sure we do not have multiple declarations of the same global symbol across compilation units. It helps debug nasty linkage bugs by guaranteeing that all reference to a global symbol use the same underlying object. It also helps avoiding benign mistakes such as declaring enum as global objects instead of types in headers (hence the minor fixes scattered across the source). Change-Id: I55c16406dc54ff8a6860238b90ca990fa6b179f1 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2018-09-14cpack: add deb/rpm packaging to VPP moduleDamjan Marion1-1/+1
This allows easy packaging of external projects, including VOM and sample plugin. i.e. $ make -C build-root PLATFORM=vpp TAG=vpp sample-plugin-install $ ninja -C build-root/build-vpp-native/sample-plugin package ninja: Entering directory `build-root/build-vpp-native/sample-plugin' [0/1] Run CPack packaging tool... CPack: Create package using DEB CPack: Install projects CPack: - Install project: sample-plugin CPack: - Install component: vpp-plugin-sample CPack: - Install component: vpp-plugin-sample-dev CPack: Create package CPack: - package: build-root/build-vpp-native/sample-plugin/vpp-plugin-sample_18.10~rc0~413~g1433e9d1-1_amd64.deb generated. CPack: - package: build-root/build-vpp-native/sample-plugin/vpp-plugin-sample-dev_18.10~rc0~413~g1433e9d1-1_amd64.deb generated. Change-Id: I6b3ec2433961e53edd976b19659ce214d272c40a Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-14cmake: use VPP package in VOMDamjan Marion1-1/+3
Change-Id: I83b244be920521e580085beffb7e40613e67c8ee Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-12Always use 'lib' instead of 'lib64'Damjan Marion1-1/+1
It is packaging responsibility to put libs in the right place. Use of lib64 resulted in huge amount of files with hardcoded lib64. This patch simplifies things... Change-Id: Iab0dea0583e480907732c5d2379eb951a00fa9e6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-07cmake: set packaging component for different filesDamjan Marion1-1/+5
Change-Id: I033a1f5cdb24f77462cb5ec90a62226d93f52925 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-31cmake: detect vpp version, set soversion, pretty config printDamjan Marion1-0/+1
Change-Id: I5d0777421debe6c3e4b93d62ad6790912063a9e6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-30cmake: a bit of packaging workDamjan Marion1-4/+19
Change-Id: I40332c2348c4aab873d726532f2ac3c4abde7ec9 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-28cmake: compile libs and plugins with -WallDamjan Marion1-0/+1
Change-Id: I1edf236295eeb934943d6ca2aed04241e9cde362 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-27cmake: add vapi buildDamjan Marion1-1/+1
Change-Id: Id939a0cbe35601478ad262f49bb0a1abdb62aa45 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-27cmake: use lib64 for lib dirDamjan Marion1-1/+1
While not sure if this is right or not, this is what autotools do Change-Id: I01f22281302b1383b0e69c3f03e5c8f8a8961358 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-26cmake: add add_vpp_library and add_vpp_executable macrosDamjan Marion1-0/+64
Change-Id: I1382021a6f616571b4b3243ba8c8999239d10815 Signed-off-by: Damjan Marion <damarion@cisco.com>