Bump the requirement to v1.4.0, which means we can remove all the ifdef
guards.
It was released over 6 years ago, with latest release being 1.5.7.
The oldest distributions we target Ubuntu 20.04 and Debian Bullseye,
have 1.4.4 and 1.4.8 respectively.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Move the requirement checking and the dummy test where they are used.
Use REQUIRED instead of the manual FOUND check and error handling.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Whenever cmake_minimum_required() is used, all the policies available in
the specified version are toggled to NEW. Thus we no longer need to
manually change them.
The highest policy - CMP0017 - has been around circa cmake 2.8.4, while
we require 3.x.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The token has been available since cmake 3.0 (at least), so might as
well use it instead of our ad-hoc check.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Move the respective include_directories() stansas to the top-level
cmakefile. While this technically adds them to targets where they are
not needed, there is no harm is having them.
This maskes the find_dependency/use_includes/use_libs more consistent
across the board and helps it stand out where it's forgotten. Fixes for
which will be coming at a later date.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The tcl ones has not been required for over a decade since commit
ffdba5b24 ("Remove check of Tcl_CreateNamespace in cmake build (not used
any more) (bug #27119)").
While the top-level one, with the EXTRA_LIBS reshuffle/consolidation a
few commits ago.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Move the handling to the top-level, adding it _once_ to EXTRA_LIBS.
Thus avoiding some duplication across the board.
Note that final handling varies a bit, namely:
- OpenBSD/intl should be handled via the existing cmake/FindGettext.cmake
- Darwin/resolv should not be needed since commit e98a32373 ("core: check
if res_init requires linking with libresolv")
- the backtrace/execinfo handling has been consolidated and moved
In the unlikely case of unwanted over-linking, the platforms can add
`-Wl,--as-needed` to their linker flags. Something which is strongly
encouraged and has been the default across multiple (linux) distros for
years.
Alternatively, if move quirks are needed they should be handled in a
single place.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Move the handling to the top-level, adding it _once_ to EXTRA_LIBS.
Thus avoiding some duplication across the board.
This change technically adds an extra link for the unit tests, which
seemingly was omitted by mistake. Alternatively, the extra over-linking
won't be an issue in practise.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Move the handling to the top-level, adding it _once_ to EXTRA_LIBS.
Thus avoiding some duplication across the board.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Move the handling to the top-level, adding it _once_ to EXTRA_LIBS.
Thus avoiding some duplication across the board.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Bump the requirement to v1.8.0, which means we can remove ~70% of the
ifdef guard.
It was released over 8 years ago, with 3 new feature releases since
then and dozen of bugfix releases in the 1.8 branch.
The oldest distributions we target Ubuntu 20.04 and Debian Bullseye,
have 1.8.5 and 1.8.7 respectively.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Bump the requirement to v3.6.3, which means we can remove the final
ifdef guard and all the builds have TLS 1.3 support.
It was released over 7 years ago, with 2 new feature releases since
then and dozen of bugfix releases in the 3.6 branch.
The oldest distributions we target Ubuntu 20.04 and Debian Bullseye,
have 3.6.13 and 3.7.1 respectively.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Bump the requirement to v7.68.0, which means we can remove ~70% of the
ifdef guards. It was released over 5 years ago, with 30+ new curl
releases since then and dozens of CVEs fixed.
The oldest distributions we target Ubuntu 20.04 and Debian Bullseye,
have 7.68.0 and 7.74.0 respectively.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit introduces fuzz testing, for now on core functions, with 4 new
targets that are built on demand with CMake option `ENABLE_FUZZ` (build of
these tests is disabled by default):
- weechat_core_calc_fuzzer
- weechat_core_crypto_fuzzer
- weechat_core_string_fuzzer
- weechat_core_utf8_fuzzer
Bump the requirement to v3.3.0 as available in Ubuntu 16.04 (3.4.10) and
Debian 10 (3.6.7). It was released around 10 years ago and any remotely
supported distribution has newer version.
As result, we can remove hundred+ lines of #ifdef spaghetti code.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Remove the local cmake file and associated hacks used to manage GnuTLS.
This gives us less build-system glue code and makes it easier to enforce
a minimum version for GnuTLS.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Bump the requirement to v7.47.0 as available in Ubuntu 16.04 (7.47.0)
and Debian 10 (7.64.0). It was released around 9 years ago and any
remotely supported distribution has newer version.
As result we can adjust the tools/check_curl_symbols.py script to omit
the ~70% of the guards and simplify the code base.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The cURL project has provided a pkg-config file for well over a decade
now. Just use that instead of the cmake one, since the latter also
checks for misc curl components, unusual library names (libcurl_imp)
which is not something we need.
In addition, this will make enforcing minimum version much easier.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Seemingly unused for ~12 years, since commit a99d13601 ("core: add new
plugin "script" (scripts manager, replacing scripts weeget.py and
script.pl)")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
With the circular dependency resolved, we no longer need this variable.
Add the respective objects directly, in the same order as seen in the
tests.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
In order to resolve the circular dependency, we need to annotate the
respective static libraries as "object" libraries.
This requires cmake 3.12, where Debian 10 (old old stable) and Ubuntu
20.04 have 3.13 and 3.16 respectively.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Use pkg-config to detect libgcrypt, since command `libgcrypt-config` is not
available any more.
Remove patches for Debian/Raspbian Buster and Ubuntu Bionic: detection of
libgcrypt don't work any more with version 1.8.4 on Debian Buster and 1.8.1 on
Ubuntu Bionic (both versions don't provide the file `libgcrypt.pc`).