Commit Graph

242 Commits (3a776b3ed1e18522ee353762402cf7bb243e3983)

Author SHA1 Message Date
Jason Rhinelander 5b7d194ff1 Merge remote-tracking branch 'origin/master' into dev 4 years ago
Jason Rhinelander a2d46eda1e Colour diff; print error *after* diff, and make it red 4 years ago
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).
4 years ago
Jason Rhinelander 5087ba2364 Regex fix 4 years ago
Jeff Becker 06348ced47 fix typo in makefile 4 years ago
Jeff Becker 64157d5d44 track libcurl and libuv with cmake, add libuv submodule 4 years ago
Jeff Becker 04c542b03f
clean up makefile targets to remove some old unused ones 4 years ago
Jeff Becker 3ac2a3defa
add dist source tarball generation and bundle it with gitlab static release 4 years ago
Jeff Becker 1072d9b505
detect travis using environmental vars 4 years ago
Jeff Becker a7d616843f
add shitty check for running in travis with workarounds because god is dead and travis-ci fucking sucks. 4 years ago
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).
5 years ago
Jason Rhinelander 16d2296b11 Add -DBUILD_PACKAGE=ON to make cpack code opt-in 5 years ago
Jeff Becker 230f28f20a tinker with release scripts to hopefully appease the apple gods. 5 years ago
Jeff Becker cc6d4e9401 turn off optimizations for releases 5 years ago
Jeff Becker 7c81c7502d static link on macos 5 years ago
Jeff Becker fc14c25771 fix up cpack for macos 5 years ago
Jeff Becker b3eaf92588 add mac target for release 5 years ago
Jeff Becker dbaed61100 make gitlab pump out 32 bit installers, no lto for builds as that is cursed for now. 5 years ago
Jeff Becker 6c3fab84ec update ci for windows installers 5 years ago
Jeff Becker 7406dbc964 cpack win32 5 years ago
Ryan Tharp cbb08c762e fix make static when TOOLCHAIN isn't set 5 years ago
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).
5 years ago
Jason Rhinelander ebb1950941 Add -DBUILD_PACKAGE=ON to make cpack code opt-in 5 years ago
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
5 years ago
Stephen Shelton 30e7c7f828
Bump clang-format version 8 -> 9 5 years ago
Jeff Becker 83b418b636
make fresh docs every time 5 years ago
Jeff Becker 3d20105646
cleanup unused files and add doc target in wrapper makefile 5 years ago
Jeff d3091cf9fc
Merge pull request #1167 from tewinget/tooling
RouterHive initial PR
5 years ago
Jeff Becker aaae6f1ba9
tinker with release scripts to hopefully appease the apple gods. 5 years ago
Jeff Becker 1e5a81846e
turn off optimizations for releases 5 years ago
Jeff Becker 7d8101e177
static link on macos 5 years ago
Jeff Becker 9428689939
fix up cpack for macos 5 years ago
Jeff Becker 81dbe1288d
add mac target for release 5 years ago
Jeff Becker 3b26b8b24d
make gitlab pump out 32 bit installers, no lto for builds as that is cursed for now. 5 years ago
Jeff Becker 9d8e3736bf
update ci for windows installers 5 years ago
Jeff Becker 2190da8c81
cpack win32 5 years ago
Ryan Tharp 24cd9ca57d
fix make static when TOOLCHAIN isn't set 5 years ago
Jeff Becker 21026753d1 makefile tweaks for tommyboi 5 years ago
Jeff Becker a4141617d7 add build infra for toggling hive builds 5 years ago
Jeff Becker 26c1670af7 make it compile 5 years ago
Jason Rhinelander 84186ce0b8 Always pass XSAN to cmake 5 years ago
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".
5 years ago
Jeff 6f182c4b26
Merge pull request #1077 from majestrate/mock-lokid-rpc-2020-02-02
mock lokid for loopback testnet
5 years ago
Jeff Becker e35d17764a * add path::Path::UniqueEndpointSet_t
* start using check2 for new unit tests
* unit test for path::Path::UniqueEndpointSet_t
5 years ago
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.
5 years ago
jeff 0c971f4e9d use system packages in venv so system packages override 5 years ago
jeff 88e8b7f98c mock lokid for loopback testnet 5 years ago
Jeff Becker 77213d7fa4
add hashpinned curl tarball for static build 5 years ago
Jeff Becker 2ce592e4af
static link with docs 5 years ago
Jeff Becker a3addb7950
dont static link for release 5 years ago