Commit graph

20 commits

Author SHA1 Message Date
Jason Rhinelander 0fed73bf3d Add strip and create_archive targets for release distribution
(Copied from loki-core).
2021-01-13 15:20:23 -04:00
Jason Rhinelander 22fab68954 Move version into CMakeLists.txt and generate version.cpp
Having the version available in CMakeLists.txt lets cmake use the
version (e.g. in the following commit which generates a tar file).

Moreover it improves ccache hits drastically as this no longer needs to
pass version/tags via defined and instead only the version.cpp file has
to be rebuilt if a git tag or version changes.

This also simplifies how the version gets parsed to use std::from_chars
and a std::array<uint16_t,3> rather than a struct, which lets `<` work
for version comparison.
2021-01-13 15:19:22 -04:00
Jason Rhinelander 28e6fa66e9 Add static build capability to cmake
This is adapted from the versions in loki-core and lokinet.
2021-01-13 15:19:22 -04:00
Jason Rhinelander 6aead0bdc9 Moved cmake files into cmake/ 2021-01-12 17:21:21 -04:00
Jason Rhinelander bb2f2081ce Allow building with -flto (and make it default)
This cuts the resulting binary size by around 15-20%.
2021-01-05 18:27:55 -04:00
Jason Rhinelander 708e7a1d18 Remove cmake cruft
- loki_add_subdirectory was a unnecessary wrapper around
add_subdirectory: it was an attempt to make an idempotent version of
add_subdirectory, but that isn't needed at all and just adds cruft: the
top-level CMakeLists.txt already includes all the subdirectories so we
can just trust it.

- removed incorrect subdirectory "project()" definitions.

- crypto/CMakeLists.txt pointlessly listed all headers in the source
list.

- set c++ standard in the top-level makefile instead of on each target
since we intentionally want it everywhere.

- Linking directly to pthread/dl with conditional OS checks was wrong;
fix it to be proper cmake (linking to Threads::Threads and
${CMAKE_DL_LIBS}).

- Various cmake files erroneously listed their src directories in their
include paths.

- Made various library linkages PRIVATE instead of PUBLIC where a
transient dependency to dependent targets does not make sense.
2021-01-05 18:27:55 -04:00
Jason Rhinelander e4430326cc Use lokimq for hex/b64/b32z conversion
Removes a bunch of copied code (for base32z and hex) and boost::detail
code calls (for base64).

Also includes some additional validity checks on base64 decoding that
didn't properly validate that the input is actually base64 or of the
correct length, then used an unsafe memory copy from the
unchecked-length decoded string.
2021-01-05 18:27:55 -04:00
Jason Rhinelander b8bc84d1e1 Remove boost::{filesystem,chrono,thread}
Replace them with their std:: version.
2021-01-05 17:32:01 -04:00
Jason Rhinelander cd5e4252a8 Modernize boost cmake dependencies 2021-01-05 17:30:13 -04:00
Jason Rhinelander a259944315 Add version check on libsodium
Fixes Findsodium version detection to return the version; it was
completely broken.
2020-04-08 14:53:20 -03:00
Jason Rhinelander 21bdde5b97 Remove more unneeded include dirs
(These are also included via the lokimq::lokimq exported target).
2020-03-16 01:29:38 -03:00
Maxim Shishmarev 330581b0d4 Initial lokimq integration. Onion requests to SS. 2020-03-08 21:38:51 +11:00
Beaudan a1226184dc Default to snode sigs on 2019-07-11 12:03:52 +10:00
sachaaaaa d8780552cd unit test for command line 2019-07-03 16:58:48 +10:00
sachaaaaa 0eac8bbefb declutter main: extract command line parser logic and logging stuff 2019-07-02 16:43:54 +10:00
Maxim Shishmarev 17f31207c7 add spdlog 2019-06-24 18:05:48 +10:00
sachaaaaa 6b050886a6 Print build info at start up 2019-05-09 15:05:41 +10:00
sachaaaaa 61be6693f7 Refactor relaying code and enable signature for integration tests 2019-05-08 16:00:32 +10:00
sachaaaaa fc7a9e1dde improve build commands 2019-05-08 12:00:00 +10:00
Beaudan fb9e1805d0 Rename CmakeLists to CMakeLists to appease Linux 2019-04-10 12:15:22 +10:00
Renamed from CmakeLists.txt (Browse further)