0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 15:41:05 +08:00

342 Commits

Author SHA1 Message Date
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
Simon Giesecke
5c81bbe82e Problem: norm_engine.cpp missing in CMakeLists.txt
Solution: added it
2019-02-02 15:23:56 +01:00
Simon Giesecke
93c1843f3e Problem: duplication across ipc_listener_t, tcp_listener_t, tipc_listener_t
Solution: extract common base class stream_listener_base_t
2019-02-01 04:58:57 -05:00
Simon Giesecke
d6f8d246e2 Problem: data members are duplicated across tcp_connecter_t, ipc_connecter_t, tipc_connecter_t
Solution: extract common base class stream_connecter_base_t
2019-02-01 04:58:47 -05:00
Luca Boccassi
4a0c83fb12 Problem: yqueue false sharing issues on PPC64
Solution: detect cacheline size for aligment purposes at build time
instead of hard-coding it, so that PPC and S390 can align to a value
greater than the 64 bytes default.
Uses libc getconf program, and falls back to the previous value of 64
if not found.
2019-01-19 20:08:14 +00:00
Luca Boccassi
73d41cec57 Problem: versions are out of date
Solution: bump ABI and revisions and changelog now that v4.3.1 is out
2019-01-12 16:10:36 +00:00
Luca Boccassi
28d5ce3dfa Problem: pkg-config file cannot be used for static linking
Solution: use requires.private, which pkg-config expands recursively
so that dependencies of dependencies can be linked against when
using pkg-config --static
2018-12-15 00:44:00 +00:00
Luca Boccassi
9d06e29cb2 Problem: duplicated pkg-config template
Solution: use the same for both autotools and cmake
2018-12-14 23:27:42 +00:00
Luca Boccassi
fbf37bb668 Problem: 4.3.0 is released, need to update ABI/version
Solution: bump to 5.2.1 and 4.3.1 respectively
2018-11-28 20:06:23 +00:00
Luca Boccassi
eff190d503 Problem: ABI is not correct for 4.3.0
Solution: bump it to 5.2.0 as new stable APIs have been added
2018-11-28 20:02:27 +00:00
Bill Torpey
25e069d131 Add specific option to select radix tree implementation for subscriptions (#3304)
* Add specific option to select radix tree implementation for subscriptions (defaults to ON if draft API enabled).
2018-11-12 21:57:11 +00:00
Shubham Lagwankar
3659c1204a Problem: radix tree needs benchmarks and improvements (#3290)
* Problem: radix tree needs benchmarks and improvements

Solution: add a benchmark and make suggested improvements
2018-11-09 10:49:40 +00:00
Bill Torpey
29c369ff0b Some changes for CMakeLists.txt:
- MacOS version requires CMake version 3.0.2 (because of policy CMP0042)
- Add option to build instrumented binaries with Address Sanitizer
- Add option to select compiler intrinsics for atomic ops
- Only build docs on request (saves build time)
2018-11-02 11:10:14 -04:00
Shubham Lagwankar
c68afb412e Problem: potentially large memory footprint of trie as number of
subscriptions increases

Solution: use a radix tree instead of a trie to store subscriptions
2018-10-31 07:49:55 -04:00
Luca Boccassi
7c0017c55d
Merge pull request #3272 from hpsaturn/av/fix_for_android
fix for android building
2018-10-27 19:35:17 +01:00
Juraj Oršulić
3942195817
Update CMakeLists.txt 2018-10-22 14:08:02 +02:00
Antonio Vanegas
69ac7a934c fix for android building 2018-10-09 16:49:19 -05:00
Christoph Schulz
a21228b664 Conform to cmakelint --filter=-linelength
- Lowercase all commands
- Unify indent to 2 spaces
- Remove spaces around brackets
- Remove repitition of condition in else(...) and endif(...)

Note: (re-)running CMake did not change the content of the generated files
2018-09-10 00:12:07 +02:00
Christoph Schulz
ca7c03f825 Add instead of replace linker flags (fix for LLVM toolchain) 2018-09-09 23:24:33 +02:00
Simon Giesecke
a9973ac43f Problem: /Z7 debug info is used only for Debug build, but not for RelWitDebInfo build
Solution: apply the same commadn for RelWithDebInfo build
2018-08-16 11:40:55 +02:00
chymanfx
da8024d3c9 Problem: No CI for mingw64 (#3195)
* Problem: No CI for mingw64

Adding CI support for mingw64 to appveyor.yml

Reason: To help address the issue:
  Several checks fail under 64-bit MinGW on Windows when running make check #3185

* Problem: Docs do not build with mingw64, dll already in right place

Turning off WITH_DOC for mingw64
Removing copy command for mingw64 and cygwin64 (it now seems to be directly built in "bin" directoy)
2018-07-29 22:40:35 +01:00
Justus Ranvier
458f41e349
Problem: build system does not play nicely as a cmake subproject #3196
Solution: avoid exporting targets and installing files if neither
BUILD_SHARED nor BUILD_STATIC is set
2018-07-26 17:18:26 -05:00
Elliott Sales de Andrade
1e51d6e043 Problem: cmake: pkgconfig always installed in lib.
Solution: Use cmake's libdir variable to ensure that the pkgconfig file
ends up in the correct lib/lib64 directory. This matches the autotools
behaviour.
2018-07-26 00:36:46 -04:00
Andras Lasso
f1aeb7956c
cmake: Fix .dll file location in the build tree
This commit ensures that the variable CMAKE_*_OUTPUT_DIRECTORY
are considered when creating the library.
2018-07-24 18:22:47 -04:00
Jean-Christophe Fillion-Robin
b1d4955065
cmake: Streamline integration allowing config of CMAKE_*_OUTPUT_DIRECTORY
Setting EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH variables is deprecated
2018-07-24 18:22:45 -04:00
Simon Giesecke
eccf2e53bc Problem: cygwin build defines ZMQ_HAVE_WINDOWS
Solution: do not check for windows.h on cygwin
2018-06-04 15:19:13 +02:00
Simon Giesecke
a8d62d14c1 Problem: polling utilities not at a reusable location
Solution: move to separate header
2018-06-01 18:22:48 +02:00
Simon Giesecke
0dce223341 Problem: no check if noexcept is supported by compiler
Solution: add compile check
2018-05-30 22:50:30 +02:00
Simon Giesecke
7f880c256f Problem: magic numbers and data duplication in plain_*.cpp
Solution: extract constants / move to plain_common.hpp
2018-05-28 17:53:46 +02:00
Luca Boccassi
58d13395ec Problem: clang 6 warns about comparisons on 64 bit
Solution: ignore tautological-constant-compare warnings, as they
might be useless on 64 bit but they are not on 32 bit where sizeof
size_t != sizeof uint64_t
2018-05-28 14:06:41 +01:00
Simon Giesecke
2b31e50b01 Problem: No static analysis under Windows
Solution: Enable VS static analyzer and core guideline checks
2018-05-24 13:44:45 +02:00
Simon Giesecke
06e0c0776d Problem: cmake run is very slow with MSVC
Solution: skip tests than can never succeed with MSVC
2018-05-23 18:13:22 +02:00
Simon Giesecke
082b6aa641 Problem: epoll not supported under Windows
Solution: Use wepoll on Windows
2018-05-23 16:25:07 +02:00
Simon Giesecke
d326434b37 Problem: API poller cannot be set independently from I/O thread poller, poll I/O thread poller broken on Windows
Solution: change platform definitions to separate API poller from I/O thread poller, disallow configuring poll I/O thread poller on Windows
2018-05-22 18:36:04 +02:00
Simon Giesecke
d7e99085ef Problem: Warnings in Windows builds
Solution: enable warnings-as-errors
2018-05-14 17:17:10 +02:00
Lionel Flandrin
4cd2c2ebf8 Problem: address parsing code is tied to the TCP code
Solution: Factor the code into a different file with a well defined API and add
unit tests.
2018-05-02 18:06:01 +02:00
Luca Boccassi
e5eab4b91f Problem: CMake parallel build not enabled for C files
Solution: set the equivalent flag
2018-04-29 22:14:05 +01:00
Dennis Klein
0dda63660e
Install relocatable dylibs (MacOS)
Problem: When building libzmq with CMake, the installed libzmq.dylib
  has a relative install name (otool -D libzmq.dylib) on MacOS. This
  is a regression against building via autotools which sets an
  absolute install name. Effectively, the CMake built libzmq.dylib
  is rendered useless if installed in non-system directories and
  used in environments without explicit DYLD_LIBRARY_PATH mgmt. For
  example running any of the installed executables currently fails:
  $ /some_install_prefix/bin/inproc_lat
  dyld: Library not loaded: libzmq.5.dylib
    Referenced from: /some_install_prefix/bin/inproc_lat
    Reason: image not found
  Trace/BPT trap: 5

Solution: Best practice is to install relocatable dylibs.
  On MacOS this means setting an install name with a special prefix,
  e.g. @rpath/libzmq.dylib, and adding the relevant search paths
  to the embedded rpath list. In this patch the necessary CMake options
  are added to generate the desired relocatable dylibs. Find more
  information on: https://cmake.org/Wiki/CMake_RPATH_handling.
2018-04-25 20:18:42 +02:00
Steffen Wittmeier
bb4fb32925 CMake: Linker PDB install rule does not work when Visual Studio generators are used (#3040)
* Fixes issues with the PDB install rule for VS solutions

* Fix for compile PDB and linker PDB under Windows
2018-04-04 10:48:36 +01:00
Luca Boccassi
6f26a33359 Problem: 4.2.5 is out, we need to restore API changes and 4.3.x
Solution: revert the revert!

Revert "Problem: regression in 4.2.3 went unnoticed, want to release 4.2.5"

This reverts commit 5f17e26fa4c60c3de0282d1b6ad1e8b7037ed57a.
2018-03-23 19:31:42 +00:00
Arda Aytekin
6fa9362351
Fix gcc build problem
Fixed gcc-related build problem resulting from `-errwarn=%all` switch.

Fixes #3012.
2018-03-21 18:21:39 +01:00
Luca Boccassi
f0378bfbf7 Problem: 4.2.4 is out, version is out of date
Solution: bump to 4.2.5
2018-03-21 16:03:49 +00:00
Luca Boccassi
c9437ab755
Merge pull request #2986 from wittmeie/ws/fix-for-windows-imported-target
Missing IMPORTED_LOCATION_<CONFIG>property for shared-library import-targets (see zeromq/libzmq#2985)
2018-03-12 15:41:10 +00:00
Steffen Wittmeier
79d9f2ba1e Fixes missing IMPORTED_LOCATION in import-target 2018-03-12 13:38:46 +01:00
Tony Theodore
c7876c097f Problem: mingw static/shared builds have different preprocessor defines
Solution: remove objects optimisation in library build (similar to #2860)
and set PUBLIC compile definitions on all static builds instead of MSVC
only.
2018-03-12 21:56:37 +11:00
Tony Theodore
794d7a3143 Problem: certain windows header files are actually lowercase
Solution: change case of `WinSock2.h Iphlpapi.h Rpc.h` to match the
files on disk. This is only noticeable when cross-compiling from a
case-sensitive system so wouldn't get picked up in MSVC or mingw
builds running on a windows machine.

MSDN uses capitalised versions in prose and lowercase in code examples:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms737629(v=vs.85).aspx

Fixes #2978, the missing library message is a little misleading.
2018-03-12 20:19:27 +11:00
Simon Giesecke
a9712c0bf2 Problem: no unittests for mtrie
Solution: made mtrie generic (to remove complex dependency on pipe_t),
and added some unit tests
2018-03-02 13:32:51 +01:00
Francis Hart
ef7cb96782 Fix cmake install error when BUILD_SHARED is off
This fixes an error with the cmake install configuration, which
attempted an invalid copy of a .pdb file on windows, when the
BUILD_SHARED option is disabled.
2018-02-14 15:22:54 +02:00
Francis Hart
d470475272 Add cmake build option for disabling tests
This adds a new cmake build option called BUILD_TESTS, that can be used
to enable/disable building of the tests. This is enabled by default.
2018-02-14 15:22:54 +02:00
Francis Hart
dee0213108 Ensure correct cmake target suffix for all builds
This updates the cmake set_target_properperties usage, so that the suffix
is specified for the MinSizeRel build type.
2018-02-14 15:22:54 +02:00
Simon Giesecke
fafea72b92 Problem: header files not included in VS project files
Solution: add to list of sources
2018-02-13 18:38:24 +01:00
Simon Giesecke
56c726d425 Problem: no unit tests
Solution: set up initial unit tests
2018-02-11 17:25:36 +00:00
sigiesec
43c11d0a61 Problem: cmake broken under Windows
Solution: fix CMAKE_MODULES_PATH
2018-02-02 15:47:43 +01:00
sigiesec
4161793d19 Problem: clang-format not run on CI
Solution: add clang-format to cmake, and add another travis-ci build type
2018-02-02 15:47:43 +01:00
Salvo Virga
9d6a5f3c2f linkage is now homogeneous for both targets libzmq and libzmq-static
all calls to target_link_libraries are now at the same location
2018-01-15 00:36:02 +01:00
Min RK
5f8488de6d move FindSodium to builds/cmake/Modules
with the rest of the CMake modules
2018-01-13 13:15:51 -08:00
Min RK
f8da0ac721 move cmake ZeroMQConfig.cmake.in to builds/cmake 2018-01-13 13:14:53 -08:00
Sylvain Corlay
8d35cf82f1 [cmake] fix SOVERSION 2018-01-13 09:31:04 +01:00
Johan Mabille
b2a8bbd89b removing hard-coded path of librt 2018-01-10 21:07:25 +01:00
Giuseppe Corbelli
020b0bede8 Fix CMake tests on Windows (#2872)
* Changed CMake tests to use check_symbol_exists in network-related libraries on win32 instead of check_library_exists
2018-01-09 17:15:24 +00:00
Luca Boccassi
65a1e458ab Problem: 4.2.3 is out, version(s) are out of date
Solution: bump changelog, ABI revision, library and packaging version
2017-12-13 14:12:15 +00:00
Gunther Laure
5189898479 export ZMQ_STATIC compile flag to depending projects (MSVC)
Signed-off-by: Gunther Laure <glaure@dewetron.com>
2017-12-12 10:25:19 +01:00
Luca Boccassi
53e536a983 Problem: static build broken on Win + CMake
Solution: revert the objects optimisation, and go back to building
everything twice on Windows, as the static builds needs different
preprocessor definitions from the shared one, so the objects have to be
rebuilt.
Keep the optimisation for all the other platforms.
Fixes #2858
2017-12-10 17:42:42 +00:00
Steven Peters
de5e7a3983 Problem: WIN32 CMAKECONFIG_INSTALL_DIR is broken
Solution: set it to CMake instead of a subfolder of share.
See cmake find_package documentation for further info.
2017-12-06 12:45:48 -08:00
Luca Boccassi
0298d037d0 Problem: CMake rebuilds everything twice
Solution: build all the objects separately before the link step, to
avoid rebuilding when doing both static and shared builds
2017-11-20 15:55:35 +00:00
Luca Boccassi
ac552ba448 Problem: accept4 not available on all platforms
Solution: check for availability in CMake and autoconf before using it
2017-11-18 11:33:53 +00:00
f18m
bfbb4ff2e9 Background threads enhancements (#2778)
* Background thread scheduling 

- add ZMQ_THREAD_AFFINITY ctx option; set all thread scheduling options
from the context of the secondary thread instead of using the main
process thread context!
- change ZMQ_THREAD_PRIORITY to support setting NICE of the background
thread when using SCHED_OTHER
2017-10-16 12:29:03 +01:00
Luca Boccassi
7453a02144 Problem: CMake on Linux does not link libzmq with optional libs
Solution: add missing target_link_libraries
Fixes #2701
2017-08-19 12:26:36 +01:00