Commit Graph

242 Commits

Author SHA1 Message Date
Jason Rhinelander
5b7d194ff1 Merge remote-tracking branch 'origin/master' into dev 2020-05-22 00:45:24 -03:00
Jason Rhinelander
a2d46eda1e Colour diff; print error *after* diff, and make it red 2020-05-20 19:18:28 -03:00
Jason Rhinelander
c5faa86926 cmake refactor
Refactors many things in cmake to improve and simplify:

- don't use variable indirection for target names; target names are
*already* a variable of sorts.  (e.g. ${UTIL_LIB} is now just
lokinet-util).  cmake/basic_definitions.cmake is now gone.

- fix LTO enabling to use the standard cmake (3.9+) LTO mechanism rather
than shoving a bunch of flag hacks through link_libraries and
add_compile_options.  This also now enables LTO when building a shared
library (because previously the -flto hacks were only turned on in the
static code for some reason).

- build liblokinet as *either* shared library or static library, but not
both.  Building both makes things more complicated because they had
different names (lokinet-shared or lokinet-static) and seems pointless:
you generally want one or the other.  Now there is just the liblokinet
target, which will be shared or static depending on the value of
BUILD_SHARED_LIBS.

- Simplify lokinet-cryptography AVX2 code: just build *one* library, and
add in the additional AVX2 files when possible, rather than building two
and needing to merge them.

- Compress STATIC_LINK and STATIC_LINK_RUNTIME into just STATIC_LINK.
It makes no sense to use one of these (_RUNTIME) on Windows and the
other on non-Windows when they appear to try to do the same thing.

- remove a bunch of annotations from `endif(FOO)` -> `endif()`.

- move all the tuntap compilation code (including OS-specific source
file selection) into vendor/CMakeLists.txt and build tuntap as an
intermediate OBJECT library rather than keeping a global variable in 5
different files.

- move release motto define to root cmake; it made no sense being
duplicated in both unix.cmake and win32.cmake

- fix add_log_tag to not stomp on any existing source compile flags with
its definition.  Also use proper compile definition property instead of
cramming it into compile flags.

- make optimization/linker flags less hacky.  There's no reason for us
to force particular optimization flags because the cmake build type
already does that (e.g. -DCMAKE_BUILD_TYPE=Release does -O3).  Not doing
that also silences a bunch of cmake warnings because it thinks "-O0 -g3"
etc.  are link libraries (which is reasonable: that's what the code was
telling cmake they are).

- sets the default build type to RelWithDebInfo which gives us `-O2 -g`
if you don't specify a build type.

- Move PIC up (so that the things loaded in unix.cmake, notably libuv,
have it set).

- Add a custom `curl` interface library that carries the correct link
target and include paths for curl (system or bundled).
2020-05-17 23:31:23 -03:00
Jason Rhinelander
5087ba2364 Regex fix 2020-05-17 17:08:11 -03:00
Jeff Becker
06348ced47 fix typo in makefile 2020-05-17 14:54:29 -03:00
Jeff Becker
64157d5d44 track libcurl and libuv with cmake, add libuv submodule 2020-05-17 14:53:28 -03:00
Jeff Becker
04c542b03f
clean up makefile targets to remove some old unused ones 2020-05-15 11:21:52 -04:00
Jeff Becker
3ac2a3defa
add dist source tarball generation and bundle it with gitlab static release 2020-05-15 10:45:11 -04:00
Jeff Becker
1072d9b505
detect travis using environmental vars 2020-05-15 09:12:00 -04:00
Jeff Becker
a7d616843f
add shitty check for running in travis with workarounds because god is dead and travis-ci fucking sucks. 2020-05-15 09:01:47 -04:00
Jason Rhinelander
44b6ccebbd Move release motto string into CMakeLists.txt
Right after project() which contains the version, so that version +
motto updates are basically in one place (and so that non-Makefile cmake
invocations get it).
2020-04-21 16:25:30 -03:00
Jason Rhinelander
16d2296b11 Add -DBUILD_PACKAGE=ON to make cpack code opt-in 2020-04-21 16:25:29 -03:00
Jeff Becker
230f28f20a tinker with release scripts to hopefully appease the apple gods. 2020-04-21 16:11:39 -03:00
Jeff Becker
cc6d4e9401 turn off optimizations for releases 2020-04-21 16:11:39 -03:00
Jeff Becker
7c81c7502d static link on macos 2020-04-21 16:11:39 -03:00
Jeff Becker
fc14c25771 fix up cpack for macos 2020-04-21 16:11:39 -03:00
Jeff Becker
b3eaf92588 add mac target for release 2020-04-21 16:11:39 -03:00
Jeff Becker
dbaed61100 make gitlab pump out 32 bit installers, no lto for builds as that is cursed for now. 2020-04-21 16:11:39 -03:00
Jeff Becker
6c3fab84ec update ci for windows installers 2020-04-21 16:11:39 -03:00
Jeff Becker
7406dbc964 cpack win32 2020-04-21 16:11:39 -03:00
Ryan Tharp
cbb08c762e fix make static when TOOLCHAIN isn't set 2020-04-21 16:06:45 -03:00
Jason Rhinelander
f8209baf50 Move release motto string into CMakeLists.txt
Right after project() which contains the version, so that version +
motto updates are basically in one place (and so that non-Makefile cmake
invocations get it).
2020-04-19 23:18:48 -03:00
Jason Rhinelander
ebb1950941 Add -DBUILD_PACKAGE=ON to make cpack code opt-in 2020-04-19 23:18:41 -03:00
Jeff
5b1941222b
unscrew travis-ci (#1223)
* update travis ci clang-format to clang-format-9 because we use that now
add python3-dev package becuase something inside ci thinks it has python but really does not

* try using python3.6

* try working around hot garbage that is travis-ci

* add deadsnakes repo for python3.8

* prevent nullptr deference when running in unit tests

* move python3.8 to main dependancy matrix and add python3.8 to homebrew deps

* add deadsnake apt repo

* add deadsnakes and python3.8 back to previous matrix

* dev package for python

* toggle hive build in ci

* dont add pybind11 if not bulding hive

* revert setting pyenv shim for travis ci

* make native builds on by default except for windows ci

* only apply native build being off for windows release target becuase that broke macos
2020-04-18 16:58:41 -03:00
Stephen Shelton
30e7c7f828
Bump clang-format version 8 -> 9 2020-04-07 12:36:43 -06:00
Jeff Becker
83b418b636
make fresh docs every time 2020-04-07 13:16:22 -04:00
Jeff Becker
3d20105646
cleanup unused files and add doc target in wrapper makefile 2020-04-07 13:16:22 -04:00
Jeff
d3091cf9fc
Merge pull request #1167 from tewinget/tooling
RouterHive initial PR
2020-04-07 13:13:02 -04:00
Jeff Becker
aaae6f1ba9
tinker with release scripts to hopefully appease the apple gods. 2020-04-06 10:06:36 -04:00
Jeff Becker
1e5a81846e
turn off optimizations for releases 2020-04-03 13:04:41 -04:00
Jeff Becker
7d8101e177
static link on macos 2020-04-03 10:25:24 -04:00
Jeff Becker
9428689939
fix up cpack for macos 2020-04-03 10:14:19 -04:00
Jeff Becker
81dbe1288d
add mac target for release 2020-04-02 11:25:32 -04:00
Jeff Becker
3b26b8b24d
make gitlab pump out 32 bit installers, no lto for builds as that is cursed for now. 2020-04-02 11:08:08 -04:00
Jeff Becker
9d8e3736bf
update ci for windows installers 2020-04-02 11:08:07 -04:00
Jeff Becker
2190da8c81
cpack win32 2020-04-02 11:08:07 -04:00
Ryan Tharp
24cd9ca57d
fix make static when TOOLCHAIN isn't set 2020-03-17 21:54:38 -07:00
Jeff Becker
21026753d1 makefile tweaks for tommyboi 2020-03-03 19:57:09 -05:00
Jeff Becker
a4141617d7 add build infra for toggling hive builds 2020-03-03 19:57:09 -05:00
Jeff Becker
26c1670af7 make it compile 2020-03-03 19:57:09 -05:00
Jason Rhinelander
84186ce0b8 Always pass XSAN to cmake 2020-02-24 14:27:44 -04:00
Jason Rhinelander
561bfe24c0 Add cmake "check" target to run all tests
Renames the cmake Catch2 test target to "catch" (instead of "check") and
adds a "rungtest" for gtest (because the "gtest" target is already taken
by the gtest library itself), and then repurposes the "check" target to
run both test suite binaries.

Also updates the top-level Makefile to do the same thing, except that
there the gtest target is just "gtest" instead of "rungtest".
2020-02-24 14:27:44 -04:00
Jeff
6f182c4b26
Merge pull request #1077 from majestrate/mock-lokid-rpc-2020-02-02
mock lokid for loopback testnet
2020-02-19 12:01:00 -05:00
Jeff Becker
e35d17764a * add path::Path::UniqueEndpointSet_t
* start using check2 for new unit tests
* unit test for path::Path::UniqueEndpointSet_t
2020-02-14 17:41:31 -04:00
Jason Rhinelander
2b93ccb393 Bump libsodium required version to 1.0.18
We use crypto_core_ed25519_scalar_mul which is only exported by
libsodium >= 1.0.18.
2020-02-02 16:38:48 -04:00
jeff
0c971f4e9d use system packages in venv so system packages override 2020-02-02 11:57:59 -05:00
jeff
88e8b7f98c mock lokid for loopback testnet 2020-02-02 11:32:15 -05:00
Jeff Becker
77213d7fa4
add hashpinned curl tarball for static build 2020-01-07 18:14:25 -05:00
Jeff Becker
2ce592e4af
static link with docs 2020-01-07 18:14:25 -05:00
Jeff Becker
a3addb7950
dont static link for release 2020-01-02 12:25:30 -05:00