aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2024-02-23build: Discover libepoll-shim on FreeBSDTom Jones1-0/+15
FreeBSD doesn't offer epoll, but an implementation which uses kqueue is available as an external library. On FreeBSD in subsystems which require epoll have cmake look for libepoll-shim. Type: improvement Change-Id: Iafd5406a9e2ebaa53fd94034489ffbbf87a7d040 Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-18build: Add FreeBSD as a supported platform for cmakeTom Jones1-5/+11
Allow FreeBSD as a platform in the main CMakeLists file. This requires a correct target for the compiler and an explicit name in the system check. The included subdirs require further changes to build, but the compiler needs to find them before it can complain. Type: improvement Change-Id: Ic56fe68290519ef5d3ed61082e7fb0ba0528a3fc Signed-off-by: Tom Jones <thj@freebsd.org>
2024-01-19build: fix default platformBenoît Ganne1-0/+1
When unsetting VPP_PLATFORM in cmake, it unmasks the cached value instead, misleading the platform selection logic in src/cmake/cpu.cmake Type: fix Fixes: 01fe7ab88e Change-Id: I676cd0af9ba28150f8ac07724c03df8ef24b640f Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-01-17octeon: native driver for Marvell Octeon SoCDamjan Marion1-2/+26
Type: feature Change-Id: I6898625c4e8854f777407dac3159e4c639a54860 Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-16build: add vapi scripts to VPP_HOST_TOOLS_ONLYGuillaume Solignac1-0/+8
vapi generators were missing from the VPP_HOST_TOOLS_ONLY, which prevents building an out-of-tree plugin with API files. We now install them. Type: improvement Signed-off-by: Guillaume Solignac <gsoligna@cisco.com> Change-Id: Ie613c8f64034e933124325242f2f8b3ac3955878
2023-11-07build: disable bogus warnings for GCC 12Jieqiang Wang1-0/+8
The array bounds and string overread check on GCC 12 report a dozen of false positives that result in VPP build failures on ubuntu 22.04. Work around this build issue by unconditionally disabling these two warnings if C compiler is GCC 12 or newer version. Type: fix Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com> Change-Id: I999e847bb625ebdf3ef5f11b11598c553f306670
2023-06-22tests docs: fix lcov code coverage report generationDave Wallace1-0/+1
- Updated/rebased version of https://gerrit.fd.io/r/c/vpp/+/34199 Type: test Change-Id: I43913ecfd11a4578bdb10c4be76253fe38d57976 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2022-08-25build: disable gcc warning stringop-overflow for gcc-10 or greaterDave Wallace1-0/+4
- this warning causes build errors with gcc on ubuntu 22.04 Type: make Change-Id: Id8f6ab44b2315ce8a4564ea924d799ecb6f57fdf Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2022-04-25build: add option to build only for native CPUDamjan Marion1-0/+1
Significantly reduces compilation time for uses who are interested to run binaries only on the build machine. Type: make Change-Id: I431f6f7374b6dfa8b3f7c72dc69f3d5cafd1f6bb Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-15build: c compiler version warningsDamjan Marion1-11/+34
Type: make Change-Id: I9455da47f03383df822436d1adc4c4b5e58c7cf9 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-10build: add clang-14Damjan Marion1-0/+1
clang-14 is default for Upcoming Ubuntu 22.04 LTS... Type: make Change-Id: I65328d0e90a4c13d5766e51da8b90a8899b773d9 Signed-off-by: Damjan Marion <dmarion@me.com>
2022-04-05vppinfra: refactor address sanitizerDamjan Marion1-1/+0
Type: refactor Change-Id: I5ca142ec1557d5b5c3806b43553ad9d3b5ea1112 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-03-25build: print compiler versionDamjan Marion1-1/+1
Type: make Change-Id: I1bad5f84797a1bfeb41420f408540604d461f440 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-09build: fix PYTHONPYCACHEPREFIX pathDamjan Marion1-1/+1
Type: make Change-Id: I20fd245585e5b62ff20fe3adf20b14bfef47a9ca Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-06build: leave to CMake to deal with -fPIEDamjan Marion1-2/+1
Type: make Change-Id: Icced0e09b75b3114b1652d552e288091968ee7cc Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-02build: bump min cmake version to 3.13 and remove workaroundsDamjan Marion1-12/+3
Type: make Change-Id: I1cd00257e132e671cbdd7b4710862afb07aa19e6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-11tests: make code coverage for unit tests optionalOle Troan1-0/+8
Add a new cmake option VPP_BUILD_TESTS_WITH_COVERAGE to enable building unittests with clang code coverage. Type: improvement Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I9cbe9e3031afdcd03bc8f9203d662b91677724ab Signed-off-by: Ole Troan <ot@cisco.com>
2021-11-08build: -Wno-stringop-overflow during LTO phaseDamjan Marion1-0/+4
Type: make Change-Id: I735fa411366c41981e255921eceb18ebbb4b5fe1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-06build: print compiler and library dirDamjan Marion1-0/+2
Type: improvement Change-Id: I9488c62f0d293a1ba9121c2994a788a82ba9f6a1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-02build: clang-13 supportDamjan Marion1-0/+1
Type: make Change-Id: I20770650d7e0475ee7791da4d5df941792bf7741 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-10-05build: don't hardcode triplet, allow specifying custom lib dirDamjan Marion1-1/+5
Type: fix Change-Id: I33f364fda88914f88f9b976cb83e6d3ff466f0bb Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2021-09-30build: consistent use of CMAKE_INSTALL_LIBDIRNick Brown1-1/+1
Set the RPATH to based on CMAKE_INSTALL_LIBDIR so that libraries are correctly found. Type: make Change-Id: I82d649345edea2c5d3f6b3f43e3e5869b9e580a7 Signed-off-by: Nick Brown <nickbroon@gmail.com>
2021-09-21vapi: compile vpp-api folder before the pluginsArthur de Kerhor1-2/+2
Allows to use vapi symbols in a plugin. Type: feature Change-Id: Ic4534f266964127af54651b7d19c3b611b277860 Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
2021-09-17build: use GNUInstallDirs install destinationsNick Brown1-2/+3
So as to be compliant with distribution layouts, as recommend by: https://cmake.org/cmake/help/latest/command/install.html#installing-files Type: make Change-Id: Ic46ace4f26aab1aa4902cbd013c40a92c480680d Signed-off-by: Nick Brown <nickbroon@gmail.com>
2021-07-16build: fix formatting of CMake config outputDamjan Marion1-12/+12
Type: make Change-Id: I6e40817609d022cb70887f70aa3608dc759fcd76 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-27build: kindly ask python not to polute src/Damjan Marion1-0/+1
Type: make Change-Id: I1ec82e0f3c19dee79f942996339240c73d4e380c Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-21bfd: use vnet cryptoKlement Sekera1-1/+1
Type: improvement Change-Id: I873a99c1258a97ed5ed195b9756e8302f865e7f0 Signed-off-by: Klement Sekera <ksekera@cisco.com> Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-05-11build: compiler flags handling cleanupDamjan Marion1-46/+41
Type: make Change-Id: I51f30edb91e09525ba116fe3941f2e43f9718da7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-05build: set CMAKE_EXPORT_COMPILE_COMMANDSDamjan Marion1-0/+2
Type: make Change-Id: I8c59c91b4af49efcfcf7544df01b3d20511abe52 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-04build: add set-build-type-* targets to CMakeDamjan Marion1-2/+10
Type: make Change-Id: Icf37873b461cd034567dc1b99e23d1bbb3f4b9f0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-01vlib: refactor trajectory trace debug featureBenoît Ganne1-0/+9
trajectory trace has been broken for a while because we used to save the buffer trajectory in a vector pointed to in opaque2. This does not work well when opaque2 is copied (eg. because of a clone) as 2 buffers end up sharing the same vector. This dedicates a full cacheline in the buffer metadata instead when trajectory is compiled in. No dynamic allocation, no sharing, no tears. Type: refactor Change-Id: I6a028ca1b48d38f393a36979e5e452c2dd48ad3f Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-05-01build: add option to turn off some march variantsDamjan Marion1-1/+1
Type: make Change-Id: I53f7995c7e7a7ff829c662d71f37d88780bdd140 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-30misc: experimental configure scriptDamjan Marion1-3/+33
Type: make Change-Id: Iaeb9d22eec9a7a763b63899814a44e78c8050f1f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-30build: switch release build to -O3Damjan Marion1-1/+1
Type: make Change-Id: Ia39c2f847e7b4907fdd3fcac75897b8b4c545a65 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-14misc: clang-12 supportDamjan Marion1-1/+9
Type: improvement Change-Id: Ie8ebbbcf5e93337036998d6ba8dac393b20ebc72 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-01-28build: do not _FORTIFY_SOURCE in debug modeMohammed Hawari1-1/+0
When compiling in -O0, the glibc feature.h ignores _FORTIFY_SOURCE and, in some distributions, throws a #warning, which fails the build. This patch removes -D_FORTIFY_SOURCE in all debug configurations. Change-Id: Ic30229c038353e49ff9419779e082a7083c1ea5f Type: fix Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2021-01-20build: add the missing leading underscore to FORTIFY_SOURCENeale Ranns1-2/+2
Type: fix Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I36f2d08681f90a3f8ea7598952d1e14c53f0187b
2021-01-18build: make rpath optionalNathan Moos1-1/+4
Type: feature This patch begins enabling support for building VPP as a package for a Yocto-based embedded Linux distribution. Yocto QA complains about executables and libraries with an rpath configured, as the paths may not be valid on the target system. Therefore, this patch adds a new CMake option named `VPP_SET_RPATH`, which is enabled by default but can be disabled by a Yocto-based build. Change-Id: I90e9c4ba07138032b0f76cb72a98e58470885d55 Signed-off-by: Nathan Moos <nmoos@cisco.com>
2020-11-25api: vat2 and json autogeneration for api messagesOle Troan1-1/+1
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/+12
Type: improvement Change-Id: I0e24f1d2ad5c7a11a8bd40125428f86aca867bec Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-12misc: clang-11 and gcc-10 supportDamjan Marion1-1/+1
clang-11 complains: error: field 'buffer_template' with variable sized type 'vlib_buffer_t' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end] Type: improvement Change-Id: I2cb6b4fde723a05b42cf33dd8130df074f0362ab Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-06-16vlib: address sanitizer support for stack switch, enable clangDamjan Marion1-1/+1
Type: improvement Change-Id: I81df4b61d1f0b8c1df77c1ee9bebcb491e155b69 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-06-16build: fix address sanitizer default argsBenoît Ganne1-1/+1
Type: fix Fixes: ec3a3f16e4cd3b33e2a409fb01b8d8826e05f9fa Change-Id: Iea3acd93a96b4bfc9f335e37ec04c00e8fa5ff27 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-05-27build: make address sanitizer options configurable with cmakeDamjan Marion1-0/+6
Type: improvement Change-Id: I9ee0407e0634f773862dd65ff5d5594814294c2c Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-08build: various improvementsDamjan Marion1-6/+11
- 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>
2020-05-07misc: deprecate elftoolDamjan Marion1-1/+1
Type: make Change-Id: I34fec1c40ef660177c266517eaf41d60827609f4 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-30build: rework x86 CPU variantsDamjan Marion1-1/+1
Type: improvement Change-Id: Ief243f88e654e578ef9b8060fcf535b364aececb Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-29misc: switch to clang-9Damjan Marion1-0/+2
Type: improvement Change-Id: Iebf77a63c0c19b130a3fbd26b5293304a9fed4c1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-11-27misc: add address sanitizer heap instrumentationBenoît Ganne1-0/+11
Introduce AddressSanitizer support: https://github.com/google/sanitizers/ This starts with heap instrumentation. vlib_buffer, bihash and stack instrumentation should follow. Type: feature Change-Id: I7f20e235b2f79db72efd0e756f22c75f717a9884 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-11-22build: add build types helpstring to cmake projectDamjan Marion1-0/+9
Type: feature Change-Id: Ia016fee107859d5ad22fe7959c8e9d32758e0787 Signed-off-by: Damjan Marion <damarion@cisco.com>