0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-26 23:01:04 +08:00

309 Commits

Author SHA1 Message Date
serg06
2e87390656 Initialize some CMake variables as empty before build
This prevents a bug that occurs when a parent has a `sources` variable when doing `add_subdirectory("libzmq")`.
2020-05-25 18:33:52 +01:00
Bill Torpey
c1d195641d
provide minimal support for TSAN (#3929)
* provide minimal support for thread sanitizer
2020-05-20 20:01:29 +01:00
Bill Torpey
f474b226b6 allow C/C++ standard to be specified at build time, default to C++11 if supported 2020-05-11 16:47:02 -04:00
Doron Somech
3da84c6d06 problem: no thread-safe alternative for ZMQ_PAIR
Solution: create ZMQ_CHANNEL, the thread safe alternative
2020-05-09 08:49:01 +03:00
grmt
718ad8ab96
add wss transport and fix tipc tests when building using cmake on linux (#3857)
* Allow CMAKE to generate ws and wss transports
I guess there is little use of just ws transport, so by default
GnuTLS (and libsodium) are enabled

* cmake libzmq including wss transport (ubuntu 19.10 and ubuntu 19.10 + wsl 1.0)
test_security_fails (libsodium assert !?)

* updated relicense

* make external libs gnutls nss sodium optional

* #ifdef WSS classes and functions, build test*ws* only if correct libs are included, warning if libs not present

* make libsodium optional

* cmake fix tests TIPC transport

* clang-format pointed out a wrongly placed #ifdef

* GnuTLS before 3.6.7 is not safe

* msvc doesn't agree with strlen in array declaration, test_socks now at least compiles on windows

* windows: libsodium build fails, missing include dirs set by env var

* ws transport test only works when GnuTLS is found

* Fixed condition to use NSS / built in SHA1, so that test_ws_transport should now pass, also when GnuTLS is not found
2020-04-13 23:03:19 +01:00
FeRD (Frank Dana)
31569c78d9 Problem: CMake config doesn't support multiarch
Solution: Install CMake config in arch-dependent LIBDIR/cmake

Using "share/cmake/${PROJECT_NAME}" as DESTINATION for installing
ZeroMQConfig.cmake et al works for arch-independent configs, but
is wrong for multiarch. The configs for each version of the
library should be stored below the arch-dependent LIBDIR, using
the GNUInstallDirs ${CMAKE_INSTALL_LIBDIR} variable.

Signed-off-by: FeRD (Frank Dana) <ferdnyc@gmail.com>
2020-03-16 20:22:52 -04:00
Luca Boccassi
52044b38f7
Merge pull request #3823 from somdoron/ZMQ_PEER
problem: zeromq doesn't has a thread-safe peer to peer socket
2020-02-09 21:53:18 +00:00
Doron Somech
70bc7dd925 problem: zeromq doesn't has a thread-safe peer to peer socket
Solution: a new socket type, called PEER. Very similar to SERVER, but can only connect to other PEERs. Also a new zmq_connect_peer method, that connect and return a routing-id in thread-safe and atomic operation
2020-02-09 23:20:14 +02:00
Luca Boccassi
253e9dd27b Problem: libzmq does not send ZMTP 3.1 sub/cancel commands
Solution: if all peers of a socket are >= 3.1 use sub/cancel commands
instead of the old 0/1 messages.
For backward compatibility, move the handling of 0/1 or sub/cancel
command strings to the encoders, so that the right thing can be done
depending on the protocol version.
Do not set the command flag until the encoder, so that we can handle
the inproc case (which skips the encoder).
2020-02-05 17:03:39 +00:00
Luca Boccassi
06bdebfe8d
Merge pull request #3805 from sigiesec/curve-zerocopy
CURVE: Reduce number of memory allocations and message copies
2020-02-04 08:58:31 +01:00
Simon Giesecke
2fa8185340 Problem: cannot use static libsodium library on Windows
Solution: add CMake option WITH_LIBSODIUM_STATIC
2020-02-03 22:24:16 +01:00
Luca Boccassi
d69f4dc855 Problem: commented out code in CMakeLists.txt
Solution: remove it, never used
2020-02-03 13:40:42 +01:00
Luca Boccassi
75dfbae0d1
Merge pull request #3798 from std-any-emplace/msvc-cmake-clang-buildfix
Add an extra space after "/Z7" in CMakeLists.txt.
2020-01-28 22:34:58 +00:00
std-any-emplace
e29495373e Add an extra space after "/Z7". Else the flag gets joined with the flag following this and clang-cl does not like that. 2020-01-28 21:30:56 +01:00
std-any-emplace
9b66fe2fba Both libzmq and libzmq-static are trying to work in precompiled.pch. Solution: enforce order.
Fixes https://github.com/zeromq/libzmq/issues/3776.
2020-01-28 20:57:53 +01:00
Luca Boccassi
1f00a5bf59 Problem: WS build option is independent of DRAFT
Solution: make the default depend on the value of the DRAFT build flag
2020-01-19 16:36:29 +00:00
Luca Boccassi
2c2ff01e85 Problem: CMake does not look for NSS using pkg-config
Solution: use pkg-config by default and FindPackage only as a
fallback
2019-12-28 21:17:09 +01:00
Luca Boccassi
068385c951 Problem: internal reimplementation of strlcpy used by default on Linux
Solution: use libbsd by default when available, and the internal implementation
only as a fallback, to take advantage of Linux distros maintenance of the
string libraries.
2019-12-28 16:21:06 +01:00
Simon Giesecke
334e837b88 Problem: ws_engine uses unsafe strcpy
Solution: use strcpy_s instead (define custom if not available)
2019-12-25 13:56:26 +01:00
liedtkeInTUM
65d2f1f498 Problem: if IPC enabled libzmq does not compile when in uwp build (#3747)
* Problem: if IPC enabled libzmq does not compile when in uwp build

* Problem 10.0.##### can be valid windows target versions

* Problem: No builds are triggered on uwp platform

* Problem: epoll is set before UWP platform is checked

* Problem: used wrong CMAKE_SYSTEM_NAME specifier

* Problem: build tests fails during cmake configure

* Use Win32 build step for Win32-uwp platform

* Disable compile options that produce warnings that leads to a ci fail

* winnt version is set by cmake, no need for redefinition in windows.hpp

* Eliminate all warning according Incremental and opt:icf are specified

* Prefer to disable opt flags in debug config rather than incremental linking

* CMAKE_GENERATOR should not include uwp definition

* Add release build with uwp configuration

* Problem: pointer potentially uninitialized
2019-12-06 13:27:24 +00:00
Luca Boccassi
a61db18eee Problem: WSS LAST_ENDPOINT returns WS transport
Solution: add wss_address_t subclass of ws_address_t to override the
to_string method
2019-11-28 12:37:53 +00:00
Sven Liedtke
d9d4dbbbd4 Problem: static libs are generated without given basename 2019-11-27 08:28:07 +01:00
Diego Barrios Romero
0bd8f70264 Allow renaming library from the outside 2019-11-13 12:00:47 +01:00
Simon Giesecke
66d0f3511f Problem: ipc transport not supported under Windows
Solution: implement support
2019-10-29 23:04:54 +01:00
somdoron
9be8334938 problem: sha1 external module conflict with czmq
Solution: allow to use external library (nss) for sha1 to avoid the conflict
2019-09-11 15:01:28 +03:00
somdoron
a48fdd6a7f problem: ws_engine doesn't send correct host and path
Solution: extract path and host from the address
2019-09-05 17:33:38 +03:00
Alexander Straub
2ec56d25b6 Safer regex replace, keeping options like "/Zc:twoPhase-" intact 2019-09-04 19:41:34 +02:00
Christoph Schulz
878f1d51f5 Add ENABLE_PRECOMPILED option.
You might want to disable this flag when building with Ninja.
2019-08-21 14:02:31 +02:00
bl
45243cd009 Fix build on SL6.9. Fix #3603. 2019-08-01 05:43:55 +02:00
Rishi Theivendran
afa11b0dfd Copy debug libraries for debug builds 2019-07-18 10:09:25 -04:00
Luca Boccassi
a56d36b8e5
Merge pull request #3587 from somdoron/stream_engine_base
problem: ws_engine duplicate code from stream_engine
2019-07-18 11:57:27 +01:00
somdoron
157b2a2ee0 problem: ws_engine duplicate code from stream_engine
Solution: New class called stream_engine_base which is inherited by ws_engine, zmtp_engine and raw_engine.
2019-07-18 11:28:08 +03:00
Luca Boccassi
3692b26649
Merge pull request #3579 from somdoron/zws2
problem: browser cannot communicate with zeromq directly
2019-07-16 13:28:30 +01:00
somdoron
39941a0c82 problem: browser cannot communicate with zeromq directly
Solution: implement ZWS 2.0 which websocket transport for zeromq
2019-07-16 10:12:20 +03:00
Simon Giesecke
92dbb4caee Problem: no C++ style secure memory allocator available
Solution: Added secure_allocator_t based on libsodium's memory management functions when available
2019-07-14 17:12:39 +02:00
Luca Boccassi
491a0ae107 Problem: 4.3.2 is out, need new version
Solution: bump to 4.3.3
2019-07-08 17:57:12 +01:00
skicc
d2be018800
CMake: don't try to link with librt on MinGW
On MinGW, librt will might will found as rt library in MSYS, but fails linking with "cannot find -lrt" error.
As librt is not avaiable on native Windows, we should never try to link with -lrt on MinGW (which is native Windows).
2019-06-15 21:48:32 +08:00
Simon Giesecke
2d8ef84760 Problem: CMAKE_REQUIRED_INCLUDES used in a wrong way, check_function_exists is problematic
Solution: use check_cxx_symbol_exists resp. check_type_size instead
2019-05-07 10:37:47 -04:00
Simon Giesecke
3e5843d073 Problem: include directives are cluttered throughout CMakeLists.txt
Solution: Group include directives together at the beginning of the CMakeLists.txt file
2019-05-07 10:37:47 -04:00
Simon Giesecke
7c53567b93 Problem: extra character in option name
Solution: remove it
2019-05-07 10:37:47 -04:00
Simon Giesecke
635f093744 Problem: redundant output in CMakeLists.txt
Solution: remove redundant debug output
2019-05-07 10:37:47 -04:00
Romain Moret
8eee5eb1a8 Fix a typo in CMakeLists.txt 2019-05-06 20:19:50 +02:00
Luca Boccassi
9067e3ac9d
Merge pull request #3480 from ipa/zeromq-3479
Zeromq 3479: fixed build for QNX 6.6 with CMake
2019-04-18 14:58:06 +01:00
Iwan Paolucci
e1a895917c Problem: libzmq does not build on QNX 6.6 using CMake #3479
Solution: libm and libsocket have to be linked explicitely
2019-04-18 13:23:36 +02:00
Omegastick
43e398ed86 Problem: Radix Tree benchmarks break when project is used as a submodule
Solution: Use CMAKE_CURRENT_LIST_DIR instead of CMAKE_SOURCE_DIR when findng includes
2019-04-14 16:53:54 +09:00
Jacques Germishuys
b26542bbfc Problem: strnlen may not be available
Solution: Provide an implementation
2019-03-18 11:37:53 +00:00
Claudio Biagi
d41ed6180b Proxy performance fix, ticket #3439
Improve performance of the proxy forwarding batch of message.
Add throughput benchmark for proxy.
Fix valgrind error reported on unitialized vars
RELICENSE: Add emtr grant
2019-03-08 15:02:58 +01:00
Simon Giesecke
120edd9809 Problem: selection of condition_variable_t implementation is confusing and not configurable
Solution: move configuration to build definition
2019-02-12 03:47:26 -05:00
Simon Giesecke
bfb092c3ec Problem: value for _WIN32_WINNT not always known in CMakeLists.txt
Solution: calculate from CMAKE_SYSTEM_VERSION

Problem: CMAKE_SYSTEM_VERSION might be newer than Windows SDK Version

Solution: limit _WIN32_WINNT value to Visual Studio default Windows SDK version
2019-02-12 03:47:22 -05:00
Simon Giesecke
01371398e9 Problem: monitor events are unversioned
Solution: add monitor event socket option
2019-02-02 15:33:27 +01:00