Commit Graph

205 Commits

Author SHA1 Message Date
Eugene Shalygin 89a6e3cf7a cmake: allow selecting C++ standard version during build
Also moves helper functions into a module file and replaces JOIN
generator expressions with list(TRANSFORM) commands in order to get
the correct sources list at the configure stage.
2018-10-31 00:24:41 +01:00
Arvid Norberg 9758d2f08f general cleanups of build files. Specifically to fix the propagation properties of _WIN32_WINNT, include missing CMake files in the tarball, and fix some risky ABI altering properties in CMake files 2018-10-12 10:06:59 +02:00
Arvid Norberg b90564d418 remove the IPv6 enable/disable build config 2018-08-19 22:20:54 +02:00
Arvid Norberg 4282dd072a factor out generate_peer_id into its own file 2018-07-25 08:49:18 +02:00
arvidn 4633258fbe make the DHT announce flags a strong type 2018-07-16 12:04:16 +02:00
arvidn 5530793c75 improve the API for iterating over all files and pieces, with the new strong index types. 2018-06-12 11:44:29 +02:00
Alden Torres 6c4869f044 moved instantiate_connection to aux namespace 2018-05-29 09:25:25 +02:00
Arvid Norberg ccdfd7383e move export.hpp into aux_ folder. put assert symbols in libtorrent namespace 2018-05-14 09:09:01 +02:00
Eugene Shalygin 44b5777be3 Make CMake export namespace to be consistent with library name
Use camel-cased library name "LibtorrentRasterbar" is used as namespace
name for exports and the import target in the find module.
2018-05-14 09:08:19 +02:00
Eugene Shalygin 7f2ce2ba9e Rename targets and config files for consistency
CMake does check both suffixes anyway (-config and Config), but since
the project name is "libtorrent-rasterbar", the "-config" suffix looks
better.
2018-05-14 09:08:19 +02:00
Eugene Shalygin a626f75c5e Refactor CMakeLists.txt
1. Replace custom 'shared' option with the standard BUILD_SHARED_LIBS
flag
2. Replace foreach() calls for source items with target_sources() and
generator expression $<JOIN:>.
3. Remove build types definition: makes no sense for
single-configuration generators, and is populated automatically for
multi-configuration ones.
4. Add feature summary
5. Enahnce compiler flags management for static runtime by utilizing functions
from the ucm project
6. Copy almost all options from the Jamfile.
7. If compiler supports C++14, use it.
8. Raise minimum required CMake version to 3.11 and drop bundled FindIconv.cmake
2018-05-14 09:08:19 +02:00
Eugene Shalygin 7e390b1ca7 Add tools to cmake build 2018-05-14 09:08:19 +02:00
arvidn fe612ca167 replace the TORRENT_CFG ABI check with inline namespaces around the symbol that can change ABI based on build configuration options 2018-05-13 19:25:17 +02:00
Alden Torres cb8b32f353 revert to use Boost variables in CMakeLists.txt 2018-05-01 10:50:21 +02:00
Eugene Shalygin 4afa4932df Add required dependencies to the generated package Config.cmake file 2018-04-29 19:48:26 +02:00
Eugene Shalygin 3c6e0b2578 Generate proper pkg-config file in cmake build 2018-04-29 19:48:26 +02:00
Eugene Shalygin 049e918295 build python bindings with cmake 2018-04-29 19:48:26 +02:00
Alexandre Janniaux f8889858f6 dynamically load getauxval so as to support older android devices 2018-03-12 09:11:01 +01:00
arvidn 9696082355 merged RC_1_1 into master 2018-02-25 09:36:12 +01:00
d_komarov 0ecb935d9d Fix test/CmakeLists.txt not found on Linux
* Rename test/CmakeLists.txt -> test/CMakeLists.txt
* Revert accidentally removed processing of resolve-countries option
2018-02-19 23:23:15 +01:00
d-komarov f94b62acf7 CMake improvements
CMake build scripts improved to simplify configuring and building of
project and tests.

Better use of compile definitions by replacing add_definitions with
target_compile_definitions. Use INTERFACE, PUBLIC and PRIVATE keywords
to separate scope of TORRENT_BUILDING_SHARED and TORRENT_LINKING_SHARED
definitions.

* Move tests to the separate file - test/CmakeLists.txt
* Fix use of compile definitions
* Remove redundant tailqueue.cpp
2018-02-19 23:23:15 +01:00
Alden Torres 1baf5eabdf added minimal support for cmake build in appveyor CI 2018-02-04 10:02:23 +01:00
Alden Torres 971cffaed9 added include files to CMakeLists.txt and added minimal support for cmake build in CI (#2767) 2018-02-04 02:03:40 +01:00
arvidn c8bf782bd0 bump version number to 1.1.6 2017-12-29 15:53:51 +01:00
arvidn f0bac4cac7 merged RC_1_1 into master 2017-10-14 15:22:22 +02:00
arvidn e67cf0a055 add missing files to CMakeLists.txt for test suite 2017-10-14 13:32:21 +02:00
silver e2a65adbc0 added dbghelp lib and bigobj to cmake for msvc 2017-10-14 02:22:06 +02:00
silver 2e5e7bb8dd enabled bigobj for msvc cmake build 2017-10-13 02:42:49 +02:00
Steven Siloti 87832ce706 fix building/running unit tests with cmake
Make test_common a propper library so that it can inherit build
properties from libtorrent.
Set the working directory to the test directory so that tests can find
their data files.
Remove reference to obsolete bdecode_benchmark test.
2017-09-16 10:19:10 +02:00
arvidn bb51dcdbb9 move dht_settings into its own header cpp file-pair and dht_settings into the dht namespace 2017-09-04 22:38:16 +02:00
arvidn 061732ddec bump version 2017-09-04 15:35:45 +02:00
Arvid Norberg 1075ae3b8d remove session pool allocator and use the buffer class instead (#2274)
simplify append_buffer by using size() to determine size of the buffer. make the move explicit in chained_buffer::init_buffer_entry
2017-08-28 11:37:53 +02:00
Steven Siloti 626ce25225 cmake: build examples in the same solution as libtorrent
Keep the search script for reference
2017-08-26 08:38:05 +02:00
arvidn c167e28788 move stack allocator implementation into its own cpp file 2017-07-23 16:49:24 -07:00
Steven Siloti f0ae2145ea use a handle class for listen sockets instead of raw pointers
Listen socket handles need to be week_ptr so that they can detect when a listen
socket is removed in the middle of a tracker announce on it. Use a wrapper class
to enforce that no one outside of session_impl can hold ownership of the socket
across event boundaries.

To support unit tests, listen_socket_t is also split into a base class which
holds the members needed to support the public listen socket API.
2017-07-21 19:18:44 -07:00
arvidn c4659bc345 convert peer_flags and peer_source_flags to type-safe flags 2017-07-17 10:22:32 -07:00
Steven Siloti d48c835f65 add cmake package support
This enables libtorrent to be used with the find_package command for easy
integration with applications which use cmake.
2017-07-10 16:57:29 -07:00
Steven Siloti cba3ae4849 use target_* commands to configure msvc 2017-07-10 16:57:29 -07:00
Steven Siloti 41465678cd use target_* commands to configure exceptions 2017-07-10 16:57:29 -07:00
Steven Siloti 6343794900 remove kludge to set TORRENT_DEBUG 2017-07-10 16:57:29 -07:00
Steven Siloti 023ff527b7 remove unnecessary and inappropriate flags
Cmake already has reasonable defaults for these. In any case they represent
system or user level policy and should not be hard coded in the build script.
2017-07-10 16:57:29 -07:00
Steven Siloti 71e1924372 use target_compile_definitions
The add_definitions command appends to the properties of the current directory
which is usually not what you want. Using target_compile_definitions sets
the properties of the target and allows you to specify PUBLIC definitions which
should be propagated to dependent targets. This is similar to the usage
requirements property in boost build.
2017-07-10 16:57:29 -07:00
Steven Siloti 2ed51927bf remove obsolete disk-stats option 2017-07-10 16:57:29 -07:00
arvidn 5188c190db bump version number 2017-07-02 15:03:46 -04:00
arvidn fab8af6be2 don't depend on or define UNICODE and _UNICODE on windows 2017-07-02 11:05:53 -04:00
Alden Torres 48ef3b6bf7 implemented support for BEP 51 (#1652) 2017-06-12 11:54:11 +02:00
Alden Torres e38887cb3c added add_torrent_params.cpp and moved is_nothrow asserts to cpp files (#2059) 2017-06-07 16:41:28 +02:00
arvidn 680ca6ea2b merged RC_1_1 into master 2017-05-21 21:02:09 -04:00
Mokhtar Naamani aed1f4ef9d fix cmake Debug build
Flags added to CMAKE_C_FLAGS_DEBUG are not applied to C++ files, CMAKE_CXX_FLAGS_DEBUG should be used instead.
2017-05-21 17:00:30 -04:00
Steven Siloti 761436dc97 add support for utp over multiple interfaces (#1944) 2017-04-25 23:00:41 -04:00