* Move all handling of compilation flags inot compiler flags module.
Also, make including the module do all the required compiler flag
changes.
* Switch compiler flag handling to (mostly) use properties.
This makes it easier to override individual flags on a per-target
basis and also results in slightly simpler CMake code.
* Fix typos in compiler flag handling.
* Fix missing quotes.
* Move libbpf and eBPF CO-RE bundling into CMake.
* Silence CMP0135 warnings.
* Fix handling of legacy eBPF code.
* Only enable eBPF by default on Linux.
* Correctly auto-detect the need for legacy libbpf.
* Fix include paths for libbpf linking.
* Add coreutils dependency on Alpine.
* Fix ebpf code handling.
* Fix lib path handling for libbpf.a.
* Correctly fix libbpf lib directory handling.
* Use correct comparison type.
* Move vendoring of Sentry to it’s own module.
Also, switch to pulling from the git repo instead of the release URL, as
it’s more reliable, less prone to potential tampering, and also more
consistent with all of our other vendoring.
* Actually remove the Sentry vendoring code that was in the main file.
* Move bundling of JSON-C to CMake.
* Fix JSON-C build option passing.
* Force CMake policy 77 to new behavior for JSON-C build.
This is required to ensure that options we set are propagated correctly
into the sub-project.
* Fix include path selection and handling for bundled JSON-C.
* Fix include ordering again.
* Fixup JSON header compat link handling.
* Use zlib provided by the system itself on macOS.
Searching for it with find_package() should always work on macOS since
it will find the system copy, which is always going to be there.
* Use native libuuid on macOS.
Much like zlib, macOS provides a libuuid implementation that (should)
work for us, so just use that instead of fighting with brew to find one.
* Don’t prepend system include paths.
* Skip Linux-specific checks on macOS.
This isn’t technically broken, but not making these checks makes
debugging of the build system easier.
* Minor CMake restructure.
* Prefer Protobuf’s own CMake config over CMake's FindProtobuf.
The FindProtobuf CMake module shipped by upstream CMake is broken for
Protobuf version 22.0 and newer because it does not correctly pull in
the new Abseil dependencies. Protobuf itself sometimes ships a CMake
Package Configuration module that _does_ work correctly, so use that in
preference to the Find module shipped with CMake.
Upstream bug reference: https://gitlab.kitware.com/cmake/cmake/-/issues/24321
* Properly handle protoc executable.
* Restructure to explicitly handle fallback case ourselves.
This allows proper handling of compatibility code in a way that actually
works for us without us needing to ship a special module to handle the
compatibility case.
* Switch to bundling protobuf via CMake instead of an external script.
* Fix handling of Protobuf inclusion.
- Add correct include directories for protoc.
- Skip installing protobuf when installing the agent.
* Drop spurious quotation marks.
* Properly fix generator expression for protoc include paths.
* Properly default to bundling protobuf in installer code.
* Disable ASAN in unit tests.
It doesn’t work with the modified protobuf handling and per discussion
with the team is non-critical.
* Change comment based on review.
* Revert "Disable ASAN in unit tests."
This reverts commit 6cb98b1b59.
* Disable IPMI and NFACCT plugins for unit tests.
We don’t actually have any unit tests for them, and they cause issues
building reliably in the unit testing environment.
* Disable ASAN for Abseil and Protobuf when vendoring them.
* Switch to commit hashes for protobuf/abseil.
* Restructure to better encapsulate protobuf handling as it’s own module.
* Fix up bundled protobuf version handling.
Google has complicated rules for C++ build environment support, so we
really need to be checking compiler versions and not _just_ C++ standard
version.
* Fix warnings about invalid defines.
* Integrate Go plugin with build system.
* Fix Debian packaging rules.
* Add FreeBSD support to Go toolchain handling.
* Add Go ldflags handling.
* Fix version detection when GCCGO is used.
* Fix Go ldflags handling.
* Correctly fix Go toolchain version detection.
* Properly mark Go as a required dependency in CMake.
* Disable VCS stamping as it does not work correctly on some platforms.
* Autodetect minimum required Go version from go.mod files.
This allows us to avoid needing to update the CMakeLists.txt file when
the required version changes in a Go component’s go.mod file.
* Prefix GoTools module name with Netdata to ensure we get our local module.
* Update integrations code to use new Go plugin location.
* Remove old go packaging files.
* keep old logic for initial cleanup that is working
* Re-sync Go plugin sources.
* Fix search order for finding Go toolchain.
* update module name
* fix /usr/local/go overwrite condition
---------
Co-authored-by: Fotis Voutsas <fotis@netdata.cloud>
Co-authored-by: ilyam8 <ilya@netdata.cloud>
* Properly handle systemd.cmake as a module.
* Split CMake compiler flag handling functions to their own module.
* Add include guards to modules.
* Prefix module names with Netdata.
This ensures that we end up using our local modules instead of possibly
using a system module with the same name.
* Drop include guards.
And shift systemd detection code to a macro so it’s less dangerous to
import the module multiple times.