Commit graph

336 commits

Author SHA1 Message Date
Tim Wojtulewicz
aba1f431cf Remove deprecated json NullDoubleWriter class 2024-08-07 11:58:21 -07:00
Arne Welzel
36dfe89b59 CMakeLists: Ensure Threads::Threads target exists
Fix failure on OSX with CMake 3.30 complaining about missing
Threads::Threads target.
2024-07-04 15:42:52 +02:00
Tim Wojtulewicz
dd0814c804 Add prometheus-cpp files to install set for plugins to use 2024-06-04 14:14:58 -07:00
Tim Wojtulewicz
84aa308527 Rework everything to access the prometheus-cpp objects more directly 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
1cad305e58 Add support for callbacks for gauges/counters, restore process stat metrics 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
a0ae06b3cd Convert telemetry code to use prometheus-cpp 2024-05-31 13:30:31 -07:00
Tim Wojtulewicz
54500228c6 Add prometheus-cpp submodule, FindPrometheusCpp cmake module 2024-05-31 13:30:31 -07:00
Christian Kreibich
9743023d48 Remove zeek-archiver from build config, deprecate --disable-archiver in configure 2024-04-19 12:10:55 -07:00
Peter Cullen
610799b0f9 Remove commented-out code 2024-04-17 14:17:18 -07:00
Peter Cullen
5e3008df89 Check ZEEK_VERSION_LOCAL for dashes
Insist that ZEEK_VERSION_LOCAL not contain dashes
in order to preserve overall structure of version strings.
2024-04-17 14:17:14 -07:00
Peter Cullen
cf09f137bd Update build script
Add back a couple changes that got lost during cleanup.
2024-04-17 14:16:55 -07:00
Peter Cullen
d57679e3dd Support for configurable localversion
Adds a new --localversion option to configure.
The value of localversion becomes part of the Zeek version string.
Docker builds allow an environment variable (LOCALVERSION) to set
the localversion string.
2024-04-17 14:16:47 -07:00
Tim Wojtulewicz
eedd0fbe8c Make sure that vcpkg isn't preferred if pcap_root_dir is passed in 2024-04-11 15:25:49 -07:00
Christian Kreibich
250d913dda Remove vestigial Conan bit in CMakeLists.txt
This is no longer required since we switched Conan to vcpkg a while back.
2024-03-27 16:50:08 -07:00
Christian Kreibich
602b1f88fb When configuring Spicy, be prepated for zeek_lib or zeek_exe targets.
This avoids a configuration error where zeek_exe is not defined (i.e. when
building (only) as a library). It anticipates building both the executable and
the library, which we used to do when using Conan but currently don't.
2024-03-27 16:49:07 -07:00
Christian Kreibich
e1ba20a878 Fix a typo in CMakeLists.txt when building Zeek as a library
This caused an error at configuration time since zeek_lie isn't a thing.
2024-03-27 16:12:10 -07:00
Dominik Charousset
015fddd8a1 Update Broker submodule 2024-03-18 15:39:48 -07:00
Tim Wojtulewicz
a610b8488d Fix searching for libpcap installed by vcpkg 2024-02-02 14:52:16 -07:00
Tim Wojtulewicz
674816a01d Switch all of the conan configuration to vcpkg 2024-02-02 14:52:16 -07:00
Tim Wojtulewicz
9cabff1da6 Configure c-ares before libkqueue
On platforms without a native libkqueue, c-ares is using the existing
value for HAVE_KQUEUE that was set during the libkqueue setup. We don't
pass the libkqueue information down to the c-ares cmake run so it won't
have the paths or library when it builds.
2024-02-01 10:06:28 -07:00
Christian Kreibich
832ce9f9a1 Merge branch 'topic/christian/more-feature-tests'
* topic/christian/more-feature-tests:
  Default to setting ZEEK_HAVE_JAVASCRIPT=no in CMakeLists.txt
  Show --disable-javascript in `configure --help`
  Show AF_PACKET support status in cmake output, and sort features
  Add feature tests for AF_PACKET, GeoIP, and JavaScript to zeek-config
2024-01-19 10:26:23 -08:00
Benjamin Bannier
9aba561e44 Make sure Spicy symbols are available.
The Spicy/HILTI runtime libraries are modelled as object libraries and
linked into the `spicy` and `hilti` libraries. These libraries are then
linked into `zeek_objs` which is another object library linked into the
`zeek` executable (target `zeek_exe`). On some platforms this transitive
link of object libraries is broken with `--binary-package` which causes
creation of static archives, even with our minimum required CMake
version which already contains many fixes for object libraries.

With this patch we now explicitly linked the Spicy/HILTI runtime
libraries into `zeek_exe`.

Closes #3177.
2024-01-19 12:26:44 +01:00
Christian Kreibich
2947bcda56 Default to setting ZEEK_HAVE_JAVASCRIPT=no in CMakeLists.txt
This still overrides it as appropriate when building with JS support, but shows
"JavaScript: no" in the configure output also when using
--disable-javascript, where it previously showed no output.
2024-01-18 15:52:19 -08:00
Christian Kreibich
e8007f04d9 Show AF_PACKET support status in cmake output, and sort features 2024-01-18 15:52:19 -08:00
Christian Kreibich
8ae560e7c6 Add feature tests for AF_PACKET, GeoIP, and JavaScript to zeek-config 2024-01-18 15:52:15 -08:00
Tim Wojtulewicz
bbcc4b00fb Set -Werror / /WX via target_compile_options to force warnings as errors 2024-01-08 13:25:05 -07:00
Arne Welzel
e0cf206732 Merge remote-tracking branch 'origin/topic/neverlord/avoid-openssl-header-deps'
* origin/topic/neverlord/avoid-openssl-header-deps:
  Integrate review feedback
  Avoid OpenSSL header dependencies

Added NEWS during merge and removed never set OPENSSL_INCLUDE_DIR reference
in main CMakeLists.txt.
2023-11-22 10:35:27 +01:00
Benjamin Bannier
e624c7500e Enable ccache-backed Spicy JIT for users of developer scripts.
For CI and more general BTest execution we already enabled ccache
previously, but developers using a Spicy build out of the build
directory still needed to manually set up caching.

With this patch we enable it for such cases as well via
`zeek-path-dev.*sh`.
2023-10-02 13:57:56 +02:00
Arne Welzel
bdb085af5f CMakeLists: Set Python3_EXECUTABLE hint for spicy 2023-09-15 11:39:21 +02:00
Arne Welzel
09b7caf986 configure/CMakelists: Use Python_EXECUTABLE as hint for interpreter
The PYTHON_EXECUTABLE variable was only interpreted by our own FindPythonDev.
cmake's FindPython uses Python_EXECUTABLE instead.

Also, if --with-python is not used, prefer unversioned executables that
match the version requirement. Further, remove Python_ADDITIONAL_VERSIONS
that is interpreted by FindPythonInterp which we're not using anymore.

https://cmake.org/cmake/help/latest/module/FindPython.html#artifacts-specification
https://cmake.org/cmake/help/latest/module/FindPythonInterp.html

Closes #3275
2023-09-07 12:48:37 +02:00
Dominik Charousset
f60a208b8d Forward OpenSSL include path to plugins 2023-08-29 20:05:41 +02:00
Tim Wojtulewicz
4022573d48 Merge remote-tracking branch 'origin/topic/bbannier/issue-3177'
* origin/topic/bbannier/issue-3177:
  Explicitly link Zeek executable against Spicy libraries in binary packaging mode.
2023-08-09 09:08:47 -07:00
Benjamin Bannier
26a6bc7dfe Explicitly link Zeek executable against Spicy libraries in binary packaging mode.
Closes #3177.
2023-08-09 11:31:27 +02:00
Tim Wojtulewicz
67c8e5192a Change VERSION variable in CMake config to ZEEK_VERSION_FULL 2023-08-07 09:33:52 -07:00
Tim Wojtulewicz
c743be0c54 Remove usage of FindRequiredPackage 2023-08-07 09:33:52 -07:00
Tim Wojtulewicz
18c77ddc2c Fix cmake formatting issue 2023-07-19 09:16:08 -07:00
Tim Wojtulewicz
401bdc86dd Add compiler flag to disable unknown pragma warnings on Windows
Without this flag you get a warning from every use of Type.h since it
contains a '#pramga GCC' for disabling a deprecation warning.
2023-07-18 16:13:38 -07:00
Tim Wojtulewicz
8f79bea18e Merge remote-tracking branch 'origin/topic/robin/spicy-build-dir-for-dev'
* origin/topic/robin/spicy-build-dir-for-dev:
  Set `SPICY_BUILD_DIRECTORY` in `zeek-path-dev`.
2023-07-05 13:32:50 -07:00
Robin Sommer
a3e170093d
Set SPICY_BUILD_DIRECTORY in zeek-path-dev.
Having this set allows running Spicy tests from inside
`auxil/spicy/tests`.
2023-07-05 11:32:34 +02:00
Tim Wojtulewicz
d5e2531b2f Add /J flag on Windows to force unsigned char 2023-06-30 13:48:24 -07:00
Tim Wojtulewicz
25da02fe50 Move CMake template files to separate directory 2023-06-26 13:39:59 -07:00
Tim Wojtulewicz
62382e6cb9 Force -std=c++17 mode for plugin targets, remove use of RequireCXX17.cmake 2023-06-15 09:51:32 -07:00
Arne Welzel
2fddddbf51 Merge remote-tracking branch 'origin/topic/awelzel/3090-propagate-doctest-defines'
* origin/topic/awelzel/3090-propagate-doctest-defines:
  Options: Do not output full usage on --test error
  CMakeLists: Propagate DOCTEST defines to external plugins
2023-06-15 18:35:32 +02:00
Arne Welzel
07b869e645 CMakeLists: Propagate DOCTEST defines to external plugins
If Zeek has not been built with doctest enabled then it's not easy
to run a plugin's tests (and if they really wanted to they could
again undef the DOCTEST_CONFIG_DISABLE and provide their own doctest
main() implementation.

Relates to #3090
2023-06-15 13:56:32 +02:00
Arne Welzel
2c4b2306fa CMakeLists: Add rapidjson/include to zeek_dynamic_plugin_base
threading/formatters/JSON.h has a rapidjson include. Extend the
include directories of external plugins so they are setup to find
these in Zeek's install tree.

Relates to #3090
2023-06-15 12:23:20 +02:00
Benjamin Bannier
eb1c7eff6c Clarify subitem relationship in CMake configure summary. 2023-06-09 13:31:53 +02:00
Tim Wojtulewicz
ef2473564e Revert part of previous CMake debug type fix 2023-05-22 16:11:58 -07:00
Christian Kreibich
3a55cf3911 Fix CMAKE_BUILD_TYPE_LOWER definition-vs-use ordering problem
It needs to be defined by the time we create zeek-config, which happens before
its current definition. To avoid a redundant TOLOWER when we check for presence
of --enable-debug at the beginning, this also switches this to a case-unadjusted
comparison to "Debug", which we use elsewhere in the file too.
2023-05-19 17:08:10 -07:00
Robin Sommer
933bd017f1
Fix CMake ordering issue leaving configuration paths unset. 2023-05-18 10:38:29 +02:00
Arne Welzel
bc8b5f5830 Rename util-config.h to zeek-config-paths.h and install it
The util-config.h has never been installed previously. Skimming the history,
it was only meant for inclusion from util.cc, hence the name. Now that it's
included from some other headers, rename it to align with what it
contains and install it, too.
2023-05-17 15:01:57 +02:00