Commit Graph

312 Commits

Author SHA1 Message Date
iphydf
52f6e4e7c5
Move tox_shell program to the toxins repository.
https://github.com/TokTok/toxins/tree/master/tox_shell
2018-02-06 13:06:22 +00:00
iphydf
a3a0e553f3
Move irc_syncbot to the toxins repository. 2018-02-06 11:45:50 +00:00
iphydf
f71ec8dd02
Move the tox_sync tool to the toxins repository. 2018-02-05 18:15:31 +00:00
iphydf
92ffad1a72
Use nullptr as NULL pointer constant instead of NULL or 0.
This changes only code, no string literals or comments.
2018-01-30 23:35:50 +00:00
iphydf
6f6c4dc2bd
Add -D__STDC_LIMIT_MACROS=1 for C++ code.
Without this, `UINT*_MAX` are not defined.
2018-01-29 22:14:21 +00:00
Maxim Biro
c9ed0ae8cd Show source file name and line number on crash 2018-01-25 17:27:26 -05:00
Maxim Biro
5ef37e0b63 Prefix add_test() with $CROSSCOMPILING_EMULATOR
$CMAKE_CROSSCOMPILING_EMULATOR is automatically prefixing add_test()
in CMake versions starting 3.3[1], but because we target CMake 2.8, we
can't use that and we have to add our own $CROSSCOMPILING_EMULATOR that
will prefix add_test().

[1] https://cmake.org/cmake/help/v3.3/variable/CMAKE_CROSSCOMPILING_EMULATOR.html#variable:CMAKE_CROSSCOMPILING_EMULATOR
2018-01-25 15:57:50 -05:00
iphydf
8f1bbcf83e
Use <stdlib.h> for alloca on FreeBSD.
https://www.freebsd.org/cgi/man.cgi?alloca

If stdlib.h does not define alloca, and we're using GCC (or Clang), we
define the macro ourselves in terms of a GCC builtin.
2018-01-22 21:05:30 +00:00
iphydf
033965b8cc
Make the monolith test a C++ binary.
This way, developers compile toxcore, toxav, and toxencryptsave as C++ at
least once at home, reducing the likelyhood of running into travis
failures where we compile as C++ in the windows build.
2018-01-21 20:56:30 +00:00
iphydf
d7583a719a
Remove nTox from the repo.
It's a maintenance burden nobody uses. Let's make toxic the official
console client, instead.
2018-01-20 19:05:53 +00:00
iphydf
7c2e4dd403
Add a simple conference test with 3 friends.
This tests that a message from tox1 is relayed via tox2 to tox3 when tox1
and tox3 are not friends.
2018-01-20 12:22:52 +00:00
iphydf
0b13936ce8
Use apidsl to generate LAN_discovery.h. 2018-01-16 14:17:05 +00:00
iphydf
cec5fea71b
Remove hstox test for now.
This isn't adding value. We're going to redo the whole rpc test framework
in the future, after a lot of refactoring that the hstox test currently
just stands in the way of.
2018-01-15 11:29:51 +00:00
Smoked Cheese
402664f58d
update rpm spec and use variables in cmake instead of hardcoded paths (#624) 2018-01-15 14:23:33 +03:00
iphydf
d79b15c52d
Use apidsl to generate ping.h.
The ping.api.h file looks rather ugly, but it works. This is an exercise
in finding the complete set of use cases needed from apidsl for toxcore.
We'll try to make things work as much as possible, and then make apidsl
better and make the .api.h files pretty.
2018-01-14 19:30:05 +00:00
iphydf
e775b5533b
Make Ping_Array a module-private type. 2018-01-13 23:55:08 +00:00
iphydf
d6047692a5
Bump toxcore version to 0.2.0.
We're not releasing yet, but projects preparing for the release will want
to build against this version in master.
2018-01-08 19:36:00 +00:00
iphydf
c09c3b6078
Add support for building the monolith test on android. 2018-01-06 23:37:51 +00:00
iphydf
2c8fb05f6e Remove deprecated ToxDNS
Based on #331.

Fixes #42.
2017-12-29 00:32:18 +00:00
iphydf
f2b6090eca Generate only one large library "libtoxcore".
This library contains all the code for the old libtoxcore, libtoxav,
libtoxdns, and libtoxencryptsave. The build for toxav is still optional,
and disabling it causes libtoxcore to simply not contain those symbols
and the pkg-config file to not include opus and vpx as dependencies.
2017-12-28 23:01:41 +00:00
Robin Lindén
fc0cc08b21
Release v0.1.11 2017-12-26 17:46:13 +01:00
Diadlo
b39cc55d37
Add support of IPv6 disabling 2017-11-15 15:22:19 +03:00
Diadlo
7077662e32
Replace include(CTest) on enable_testing()
CTest include generate a lot of unused targets
2017-09-14 08:31:40 +03:00
Maxim Biro
8dc261fcf2 Disable compiler thread safety analysis 2017-08-22 04:10:45 -04:00
Robin Lindén
6295d28a1e
Release v0.1.10 2017-08-06 12:22:48 +02:00
Maxim Biro
1b290c0d84 Fix Windows build 2017-06-09 23:18:43 -04:00
Robin Lindén
a429ef4a28
Release v0.1.9 2017-06-06 22:50:57 +02:00
iphydf
cb69b8a986
Build tests on appveyor, the MSVC build.
Tests are not actually ran on appveyor for now, since they all fault for
some reason. For now, we just build them. Also, some tests are disabled
on msvc entirely, because they don't even compile. We'll need to look
into those, later. They are disabled using `MSVC_DONT_BUILD`.
2017-06-05 13:45:20 +00:00
pranomostro
7f5b057b05
Add test for changing the conference title and not receiving a callback. 2017-06-05 12:50:58 +00:00
Maxim Biro
b0aec02225 Split daemon's logging backends in separate modules 2017-06-04 16:07:03 -04:00
iphydf
1e8fa85aad
Add a monolith_test that includes all toxcore sources.
This requires that every symbol, even if static (file-scope), is unique.
The idea is that we can easily run "whole" program static analysis on
programs that include monolith.h ("whole" is in quotes, as we don't
include dependencies like libsodium in this static analysis).
2017-06-04 17:48:23 +00:00
pranomostro
03f99bde2e
Test for memberlist not changing after changing own name.
This test shows that the conference members callback is not invoked when
the own name changes.
2017-06-04 13:40:44 +00:00
iphydf
41850deb43
Factor out strict_abi cmake code into a separate module. 2017-06-04 12:20:35 +00:00
iphydf
b782ef5d8e
Fix formatting and spelling in version-sync script.
Also some minor reformatting and fixes to the hstox sut driver.
2017-06-04 12:07:43 +00:00
iphydf
cda770cfe1
Forbid undefined symbols in shared libraries.
Also a little bit of refactoring:
- Moved add_cflag and friends from CMakeLists.txt to a separate
  AddCompilerFlag module.
- Build the spectest SUT if msgpack is found, even if spectest itself is
  not found, so once it exists, users can run it themselves or
  reconfigure cmake.
2017-06-04 10:08:51 +00:00
iphydf
d4be41a3ad
Use new encoding of Maybe in msgpack results.
The new encoding is `0` for `Nothing` and `[1, x]` for `Just x`.
2017-06-03 23:32:46 +00:00
Robin Lindén
f6db9333e2
Release v0.1.8 2017-04-27 20:20:19 +02:00
Maxim Biro
c25e3d2d7c Revert "initial version of tox_loop"
This reverts commit 200ee1cace.
2017-04-22 15:31:25 -04:00
Maxim Biro
c7f63737eb Revert "Implement tox_loop"
This reverts commit 5ff099763b.
2017-04-22 15:31:25 -04:00
Ansa89
5ff099763b
Implement tox_loop 2017-04-01 17:47:34 +02:00
michael bishop
200ee1cace
initial version of tox_loop 2017-04-01 17:47:34 +02:00
Carsten Brandt
d4414ffa3a
CMake: install bootstrapd if it is built
if bootstrapd option is enabled the binary should be
installed on `make install`.
2017-03-26 20:17:09 +02:00
Robin Lindén
48c86e942d
Release v0.1.7 2017-03-26 15:42:48 +02:00
Carsten Brandt
a1f9df48d6
make BUILD_TOXAV and option and fail if dependencies are missing
fixes #482
2017-03-25 17:22:16 +01:00
Maxim Biro
def92ab029 Add test for tox_strncasecmp() 2017-03-01 20:43:30 -05:00
Maxim Biro
61c3b47bef Disable -Wdisabled-macro-expansion
Due to clang's tolower() macro being recursive.
2017-03-01 20:43:30 -05:00
Diadlo
1387c8f150
Remove network dependency from toxcrypto 2017-02-26 23:19:24 +03:00
iphydf
6ae33c16cf
Add VLA compatibility macro for C89-ish compilers. 2017-01-28 20:49:12 +00:00
iphydf
895de7ef26
Release v0.1.6. 2017-01-26 23:31:27 +00:00
iphydf
ce0bf232d1
Add appveyor build for native windows tests.
It doesn't compile, yet. A few changes (like VLA support) need to be made
before we can enable appveyor as a required PR check.
2017-01-22 11:56:02 +00:00
iphydf
995578f103
Release v0.1.5. 2017-01-19 18:26:48 +00:00
Carsten Brandt
86e67f805a decouple version-sync script from cmake 2017-01-18 11:20:07 +01:00
Carsten Brandt
3520eee05d SO versions for cmake and libtool
this updates the version-sync script to generate proper SO versions
which will be used by cmake and libtool to create version symlinks
on the system when a library is installed as well as setting the SO
version in the binary.

To see what this does, you have to configure tox with a prefix:

    ./configure --prefix=/tmp/tox-with-libtool
    mkdir cbuild && cd cbuild && cmake -DCMAKE_INSTALL_PREFIX=/tmp/tox-with-cmake ..

Then run `make && make install`.

in both instances you should see the following installed in `lib/`:

    libtoxcore.so -> libtoxcore.so.1.4.0
    libtoxcore.so.1 -> libtoxcore.so.1.4.0
    libtoxcore.so.1.4.0

inside the binary the soname should be the one with .1 and it should not
contain the full version:

    $ objdump -p libtoxcore.so.1.4.0 | grep SONAME
      SONAME               libtoxcore.so.1
2017-01-18 11:20:07 +01:00
iphydf
5ad3c98905
Make building DHT_bootstrap in cmake optional.
It's enabled by default.
2017-01-16 22:43:41 +00:00
iphydf
27a97a8280
Release v0.1.4. 2017-01-12 15:48:39 +00:00
iphydf
8b4eae4038
Remove TOX_DEBUG and have asserts always enabled.
These are cheap asserts. I've also replaced the fprintf's with
`LOGGER_ERROR` calls.
2017-01-11 19:43:08 +00:00
Carsten Brandt
31eaffe44b
added comment to magic code in CMakeLists.txt
This part has been added in
67ac9138ab
Took the commit message to provide a comment in the file.
2017-01-08 19:16:09 +01:00
endoffile78
e667ec23b9
Replace make_quick_sort with qsort 2017-01-07 11:47:30 -06:00
iphydf
01cb35c1f6
Warn on -pedantic, don't error yet.
We still have some non-standard C code in toxcore for now.
2017-01-06 22:19:13 +00:00
David Zero
8ef1f35ca7 Revert "Revert "Portability fixes""
This reverts commit 59e2a844f0, and
defines _DARWIN_C_SOURCE in toxcore/network.c
2017-01-06 04:20:00 -08:00
iphydf
fdb46f6cf2
Release v0.1.3. 2017-01-05 22:02:11 +00:00
endoffile78
59e2a844f0 Revert "Portability fixes"
This reverts commit f3469070fe.
2017-01-05 15:16:56 -06:00
iphydf
0a61d11085
Test a few cmake option combinations before the build.
This takes a few seconds but allows us to cover cases that aren't checked
often.
2017-01-05 12:34:52 +00:00
David Zero
f3469070fe Portability fixes
- CFLAG gnu99 was changed to c99.
- CXXFLAG c++98 was changed to c++11.
- CFLAG -pedantic-errors was added so that non-ISO C now throws errors.
- _XOPEN_SOURCE feature test macro added and set to 600 to expose SUSv3
  and c99 definitions in modules that required them.
- Fixed tests (and bootstrap daemon logging) that were failing due to
  the altered build flags.
- Avoid string suffix misinterpretation; explicit narrowing conversion.
- Misc. additions to .gitignore to make sure build artifacts don't wind
  up in version control.
2017-01-04 13:44:39 -08:00
Diadlo
06a68f0f5f
Add secure memcmp and memzero implementation.
Implementation mostly taken from libsodium utils.

Fix #347
2017-01-04 00:40:17 +03:00
iphydf
4dc38c086d
Remove .cabal-sandbox option from tox-spectest find line.
This was just for finding it in toktok-stack, which now uses
haskell-stack, and thus no longer has a .cabal-sandbox. We'll just assume
that the Makefile properly sets up the path such that tox-spectest is
available.
2016-12-29 11:36:39 +00:00
Nils Fenner
4b32658d56 simplify integration as a third-party lib in cmake projects
The CMAKE_SOURCE_DIR variable points to the top-level directory of a project while we want to point to the top-level directory of the lib. This change simplifies the integration as a third-party lib. We can use CMAKE_CURRENT_SOURCE_DIR or simply "nothing" ('.') to point to the directory where the CMakeLists.txt file resides.
2016-12-28 11:04:27 +01:00
iphydf
a096c71db8
Release v0.1.2 2016-12-23 02:41:01 +00:00
iphydf
db71602731
Use tox_options_set_* instead of direct member access.
Also added a `tox_options_copy` function for cloning an options object.
This can be useful when creating several Tox instances with slightly
varying options.
2016-12-22 10:53:39 +00:00
iphydf
de623f9eb9
Add test to check if tox_new/tox_kill leaks.
We create and destroy 20k tox instances and run a single tox_iterate on
it. This test is not comprehensive, but provides a simple check to see
whether the destruction properly cleans up memory and perhaps other
resources.
2016-12-20 20:27:51 +00:00
iphydf
b0647b174c
Release v0.1.1 2016-12-17 00:47:08 +00:00
iphydf
7d2f2e4607
Release 0.1.0.
Fixes #216.
2016-12-14 09:35:59 +00:00
iphydf
bb0fbf94ae
Fix Libs line in toxcore.pc pkg-config file.
CMake lists are `;` separated and CMAKE_THREAD_LIBS_INIT contains
"-lpthread". This resulted in "-l-lpthread;-lrt" on Linux.
2016-12-14 01:34:57 +00:00
iphydf
b14b8d07fa
Add compatibility pkg-config modules: libtoxcore, libtoxav.
These were generated by the autotools build. Some clients may depend on
these files instead of the newer split pkg-config files. New clients
should be using the toxcore, toxav, toxencryptsave, and toxdns modules.
2016-12-13 20:58:32 +00:00
iphydf
4cf69996cc
Add apidsl file for toxencryptsave.
This breaks the toxencryptsave API. It hides the Tox_Pass_Key struct
definition.
2016-12-13 14:24:40 +00:00
sudden6
3cfe5544b1
Fix version compatibility test.
Also added some test cases for it.
2016-12-13 02:06:25 +00:00
Robin Lindén
029c4fb83f Fix padding in SAVED_FRIEND struct and add test.
Test covers saving and loading of a Tox instance with a friend added.
2016-12-13 01:36:28 +01:00
iphydf
d8ae726d0a Don't build nTox by default.
Build it on Travis. It won't be built on the windows builds regardless
of having it enabled globally.

Fixes #292.
2016-12-05 22:02:30 +00:00
Maxim Biro
f0f53dbd55 Don't error on warnings by default
Having -Werror set by default causes users' builds to fail because
toxcore is not warning-free. Failing on errors is appropriate for the
development phase, e.g. when building it in a CI enviroment, but it
doesn't make much sense to fail builds for users and let them figure out
that they need to pass -DWARNINGS=OFF to make the library build.
2016-11-28 15:13:01 -05:00
Gregory Mullen (grayhatter)
d6bad9078b
Version Patch v0.0.4 => v0.0.5 2016-11-24 19:55:45 -08:00
Ismael Luceno
19711d0fd0 Add knob to suppress building the nTox client 2016-11-23 22:01:50 -02:00
Ismael Luceno
15993d40a4 Add knob to suppress building the toxav test 2016-11-23 22:01:50 -02:00
iphydf
75a33d2201 Mark Tox_Options struct as deprecated.
We will remove it in v0.1.
2016-11-21 00:16:59 +00:00
iphydf
404042cc2d
v0.0.4 2016-11-14 02:20:25 +01:00
iphydf
8bbde23f48
Use apidsl for the crypto_core API.
This allows us to use apidsl features like namespaces to enforce a
naming standard.
2016-11-12 11:55:40 +00:00
iphydf
a205b788ad
Disable -Wunused-but-set-variable compiler warning flag.
This warning is triggered in `av_test.c`, where we have an open issue.
Silencing the warning locally would make the issue less visible. This
way, we will see the warning when we start removing the `-Wno-*` flags.
2016-11-11 23:31:13 +00:00
iphydf
42dfdf73c1
Add spectest to the cmake test suite.
This allows for easier development. It is not used on travis (yet).
2016-11-08 21:58:26 +00:00
iphydf
dd5e69b3bf
Disable some gcc-specific warnings.
Also, disable -pedantic on C++, because it's not really useful there,
and causes a lot of warnings on `enum FOO { BAR, };` (comma at end of
enumerator list).
2016-11-08 12:03:20 +00:00
iphydf
2a7bc19004
Release v0.0.3. 2016-11-07 00:56:59 +00:00
endoffile78
3f53090c1d
Remove assoc 2016-11-06 09:14:53 -06:00
iphydf
cf94537266
Enable all possible C compiler warning flags.
We disable the ones that fire, so we can use -Werror. We can then
investigate each warning individually and see whether to fix it or to
keep silencing it.
2016-11-06 01:32:10 +00:00
iphydf
96c672aef5
Compile as C++ for windows builds.
Compiling as C++ changes nothing semantically, but ensures that we don't
break C++ compatibility while also retaining C compatibility.

C++ compatibility is useful for tooling and additional diagnostics and
analyses.
2016-11-02 18:50:41 +00:00
Gregory Mullen (grayhatter)
60e15f165e
Version Patch v0.0.2 2016-10-30 11:16:16 -07:00
Dmytro Vorobiov
59d27e6d94 toxav renaming: group.{h,c} -> groupav.{h,c}
toxav file for "group" conflicts with toxcore "group" file. While this
works fine in almost all cases, Xcode on macOS is confused with that.
2016-10-28 22:11:48 +02:00
iphydf
de966cdf90
Error if format_test can't be executed.
This ensures that on Travis, format_test will always be executed, or the
build fails.
2016-10-26 13:34:29 +01:00
iphydf
6d0c8060c1
Remove duplicate tests: split tests part 2. 2016-10-11 21:29:58 +02:00
iphydf
1ce4c3fe13
Install libraries with RPATH.
This makes deployment easier, as the install libpath is used to look up
dependent libraries.
2016-10-11 14:05:41 +02:00
iphydf
0fb79c54b8
Set log level for DEBUG=ON to LOG_DEBUG.
We use TRACE=ON (cmake flag) to enable LOG_TRACE. This way, a regular
build can enable DEBUG while not paying the price of TRACE. This is
particularly important for FFI bindings (especially Python), where
invoking callbacks can be an expensive operation.
2016-10-06 15:15:42 +01:00
Maxim Biro
02e9cd38f1 Add option to build tox-bootstrapd
When cross-compiling to <target> from Linux, cmake might find native Linux
libconfig and decide to build tox-bootstrapd. If the target is Windows, this
will fail, as tox-bootstrapd can't be built for Windows in the first place. If
the target is Linux of some other architecture, then using host native
libconfig will fail too. Thus an option is needed to guard against this.
2016-10-05 23:47:39 -04:00
Maxim Biro
ac8fb636a1 Add option to set test timeout
Some tests take 20 or more minutes to run before they timeout, this allows
to limit their runtime if needed.
2016-10-04 12:48:24 -04:00
iphydf
b8b9789a69
Rebuild apidsl'd headers in cmake.
- Moved apidsl headers next to their generated versions. In the future,
  perhaps all (or most) headers will be apidsl-generated, so the sources
  should stay together.
- Try to find apidsl/apigen binary and astyle binary and use it for the
  format test. Don't run the format test if these can't be found.
2016-10-02 23:54:03 +01:00
iphydf
66e1bb4510
Remove the _test suffix in auto_test calls.
All tests must end in `_test` so we can use this convention to slightly
shorten the names in `auto_test` calls. This also enforces the
convention so future tests obey it.
2016-10-02 15:14:19 +01:00
iphydf
36f40f1a4f
Add version-sync script to update all places with versions.
This will update tox.in.h only. Currently, you will still need to
manually update tox.h. An upcoming PR (#154) will update tox.h as
part of the build.
2016-09-28 23:29:36 +01:00
Gregory Mullen (grayhatter)
51139a080c
v0.0.0 => v0.0.1 2016-09-28 12:12:39 -07:00
iphydf
d369448ace
Work around bug in opencv3 headers.
OpenCV 3.1 doesn't define cvRound in C, only in C++. Thus, we now need
to compile av_test as C++ code.
2016-09-25 01:58:51 +01:00
iphydf
f60900c4b8
Move ring buffer out of toxcore/util into toxav.
Toxcore itself doesn't use this data structure. Only toxav does, so now
toxav owns the code for it.
2016-09-24 23:36:50 +01:00
iphydf
15cb426166
Make toxcore code C++ compatible.
It is still C code, so still compatible with C compilers as well. This
change lets us see more clearly where implicit conversions occur by
making them explicit.
2016-09-24 21:53:50 +01:00
iphydf
aa7670da5a
Fix strict-ld grep expressions to include digits.
`tox_options_[gs]et_ipv6_enabled` were missing from the version script
because the grep expression only accepted `[a-z_]`. Now it also accepts
digits in the function names.
2016-09-21 22:36:29 +01:00
iphydf
e59fd26d49
Add OSX and Windows build to travis config.
Tests for Windows are disabled for now, until we figure out which tests
can successfully run on wine and select only those.
2016-09-20 13:52:33 +01:00
iphydf
67ac9138ab
Add STRICT_ABI cmake flag to generate export lists.
Enabling this flag will generate and use an LD version script. It
ensures that the dynamic libraries (libtoxcore.so, libtoxav.so) only
export the symbols that are defined in their public API (tox.h and
toxav.h, respectively).
2016-09-19 19:42:12 +01:00
iphydf
f41b010e9b
Only build toxav if opus and vpx are found. 2016-09-18 02:18:24 +01:00
Jfreegman
8e43ca834c Complete old groupchat conversion to new API 2016-09-17 19:11:28 -04:00
iphydf
c0397a0a46 ApiDSL'ing old group chats (now: conference). 2016-09-17 19:11:28 -04:00
iphydf
5da85c582d
Fix for windows dynamic libraries. 2016-09-17 19:54:22 +01:00
iphydf
d1f16e27b8
Add option to build static libraries. 2016-09-14 14:32:01 +01:00
iphydf
254feb0acd
Add address sanitizer option to cmake file. 2016-09-08 10:13:40 +01:00
iphydf
6356eb4e4f
Enable build of av_test.
It has not been built in a while. We do want to keep this one working (or at
least compiling).
2016-08-31 20:02:41 +01:00
iphydf
8595d47e10
Remove unused and bit-rotten friends_test. 2016-08-31 18:11:44 +01:00
iphydf
fa3b51266b
Add missing #includes to headers and rename tox_old to tox_group.
Also, no longer #include the group code into tox.c. Instead, compile it
separately in tox_group.c. This is a bit less surprising to someone looking
around the code. Having some implementations in a .h file is certainly a bit
surprising to a disciplined C programmer, especially when there is no technical
reason to do it.
2016-08-30 19:31:40 +01:00
iphydf
13ae9e9a93
Move logging to a callback.
This removes the global logger (which by the way was deleted when the first tox
was killed, so other toxes would then stop logging). Various bits of the code
now carry a logger or pass it around. It's a bit less transparent now, but now
there is no need to have a global logger, and clients can decide what to log and
where.
2016-08-27 01:16:14 +01:00
iphydf
7075c3648a
Add cmake test for apidsl. 2016-08-24 09:41:40 +01:00
iphydf
b044cfbf15
Fix windows build.
The threading networking functions (on windows: winsock and friends) need to be
linked into the toxnetwork library, not the toxcore library, anymore. On Linux
and OSX, there is no winsock. On OSX, there is no need to link against threading
libraries, and on Linux, toxnetwork can have unresolved symbols when linking, so
this failure wasn't caught before.

Tested by building on the iphydf/windows-x86-qt5 docker image.
2016-08-21 14:21:57 +01:00
iphydf
f9c83c1084
Build assoc DHT code on travis. 2016-08-20 00:59:22 +01:00
iphydf
db22522741
Add missing DHT_bootstrap to CMakeLists.txt.
- This PR also adds a DEBUG cmake option that enables -DTOX_DEBUG.
- We also remove `-Wall`, because there are too many warnings, and nobody really
  looks at them at the moment. We'll see about fixing them soon. We'll also want
  to enable `-Werror` at some point.
- Finally, this PR enables `-O3` to make sure toxcore still works correctly
  under heavy compiler optimisations.
2016-08-17 22:12:39 +01:00
iphydf
cebf64a588
Split toxcore into layers.
This allows us to more clearly define interfaces between modules, and have the
linker help us ensure that module boundaries are respected.

The onion/tcp/net_crypto layer is a bit too large. This is due to a cyclic
dependency (onion -> net_crypto -> TCP -> onion). We may or may not want to
break that cycle in the future to allow the onion library to exist on its own
without net_crypto.
2016-08-16 17:36:18 +01:00
iphydf
35932b5381
Add "make install" step to Travis build. 2016-08-12 20:49:50 +02:00
iphydf
11de2c222f
Build tox-bootstrapd in the cmake build. 2016-08-12 01:58:23 +01:00
iphydf
b5cfd33340
Add and use CMake build script
Also, fix the hstox build that was taking half an hour. It now takes 5 minutes.
Also, perform distcheck on travis to ensure that make dist works. It's not
actually failing the build at the moment due to broken tests.
2016-08-12 01:13:11 +01:00
jin-eld
1ec70337cf Remove cmake build system 2013-08-24 03:36:43 +03:00
jin-eld
e658892793 Rename core directory because of autoconf name clash
While doing the checks configure might generate "core" files and will
then try to remove them. Having a "core" directory generates an error
while runing the configure script.

There's no workaround but to rename the core directory.
2013-08-24 03:25:07 +03:00
Manuel Argüelles
7ffa4017aa Make wide character support optional
Issue #514. FindCursesw modified to make it simpler. Wide character
can be disable by passing NO_WIDECHAR=ON.
2013-08-22 15:57:34 -05:00
Manuel Argüelles
d840e8a743 Add cmake module for ncursesw
Default Curses module fails to detect the wide char version of curses
when both are installed. Current module should do better.
2013-08-21 16:11:07 -05:00
naxuroqa
487c7d27d5 Fix for issue 472 2013-08-16 09:40:53 +02:00
slvr
91d8344cca Macports support (OS X only). MAP_ANON -> MAP_ANONYMOUS (OS X only). 2013-08-09 16:51:54 +01:00
Astonex
85092b6441 Update CMakeLists.txt 2013-08-08 21:58:54 +01:00
charmlesscoin
4b34ecf913 added files for unit tests 2013-08-07 00:18:27 -04:00
Maxim Biro
03a2bac319 Improved cmake 2013-08-04 22:25:07 -04:00
Maxim Biro
f03dc44e97 Fixed Windows build 2013-08-04 21:20:48 -04:00
Chloride Cull
add9c0b6dc Changed CMake options to compile the core shared
It is now compiled under 'toxcore' instead of just 'core' to be able to be installed without conflicts.
2013-08-03 18:25:12 +02:00
Filipp Ozinov
5ea6b58ec4 Curses check is now only on *nix 2013-08-03 11:08:21 +04:00
Filipp Ozinov
a85fce5c03 Curses dependence added to CMake 2013-08-03 09:17:44 +04:00
Florian Hahn
7ebc69f374 Add docs directory to cmake 2013-08-01 21:22:41 +02:00
irungentoo
55a2e59a64 Fixed build. 2013-07-31 08:35:06 -04:00
irungentoo
f2f266e9a7 Merge branch 'master' of https://github.com/xzfc/ProjectTox-Core into xzfc-master
Conflicts:
	CMakeLists.txt
2013-07-31 07:56:10 -04:00
xzfcpw
f77fe65d54 NaCl compiling option 2013-07-31 15:42:05 +07:00
Dmitry Marakasov
89dd7ed011 Add detection of required libraries 2013-07-31 06:15:26 +04:00
Maxim Biro
34bc2fad35 Fixed tabulation 2013-07-21 21:17:08 -04:00
Maxim Biro
533f136d0e Made a cmake project for Core 2013-07-21 20:41:08 -04:00
Maxim Biro
ec38df6f91 Set appropriative cmake_policy 2013-07-17 18:41:58 -04:00
Maxim Biro
6939a48226 Apply compiler flags only once 2013-07-17 18:29:26 -04:00
Maxim Biro
ef0efd72b5 Improved build system 2013-07-17 18:18:27 -04:00
Oliver Hunt
a58a6f5c7b prettier output 2013-07-14 03:27:23 +01:00
irungentoo
65bda2a6c9 ncurses test doesn't work very well. Putting back the old test. 2013-07-13 21:07:30 -04:00
irungentoo
11a39bb49a Cmake changed, small change in random_int()
Cmake builds now builds the new ncurses test only on non windows.
2013-07-13 19:24:14 -04:00
Oliver Hunt
5441562e11 Added ncurses tox client 2013-07-13 23:42:05 +01:00
Maxim Biro
573c88df44 Fixed cmake and Travis 2013-07-12 21:06:22 -04:00
irungentoo
5725e86a93 Build fixed? 2013-07-12 17:03:54 -04:00
irungentoo
79aa715514 First part of DHT hardening done.
Added crypto to the DHT communications.

This defeats completely the first attack mentioned in
docs/DHT_hardening.

Also updated the build system to build the latest test (it links it with
libsodium)
2013-07-12 16:27:19 -04:00
irungentoo
a632d960f8 Fixed to be confilcts with the DHT and the messenger part. 2013-07-07 11:54:25 -04:00
irungentoo
c7f7e30c75 Moved the network functions from the DHT into network.
Also made a nice function to init networking.
2013-06-26 09:56:15 -04:00
Maxim Biro
c2ad80431b Added warnings for GCC 2013-06-26 02:16:38 -04:00
Maxim Biro
20c7244357 Added a simple cmake list 2013-06-24 20:55:30 -04:00