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.
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
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
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.
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.
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.
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.