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

205 Commits

Author SHA1 Message Date
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
sigiesec
301f3c70c2 Problem: code duplication between curve_client_t and curve_server_t decode and encode
Solution: extracted common base class curve_mechanism_base_t
2017-08-18 11:34:22 +02:00
sigiesec
6e8a0b31be Problem: ZAP client code is duplicated in all mechanisms
Solution: created a zap_client_t class, extracted first function send_zap_request from curve_server_t
2017-08-16 18:04:30 +02:00
Brian Russell
b963542e8f Add socket option BINDTODEVICE
Linux now supports Virtual Routing and Forwarding (VRF) as per:

https://www.kernel.org/doc/Documentation/networking/vrf.txt

In order for an application to bind or connect to a socket with an
address in a VRF, they need to first bind the socket to the VRF device:

    setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, dev, strlen(dev)+1);

Note "dev" is the VRF device, eg. VRF "blue", rather than an interface
enslaved to the VRF.

Add a new socket option, ZMQ_BINDTODEVICE, to bind a socket to a device.
In general, if a socket is bound to a device, eg. an interface, only
packets received from that particular device are processed by the socket.

If device is a VRF device, then subsequent binds/connects to that socket
use addresses in the VRF routing table.
2017-07-31 15:31:47 +01:00
Luca Boccassi
fbb6bbdcb8 Problem: reading from /dev/urandom is clunky
Solution: if available use the getrandom function as it doesn't
require any synchronization, state or cleanup
2017-07-28 11:28:19 +01:00
Luca Boccassi
2626fdfa23 Problem: tweetnacl leaks file descriptor on fork+exec
Solution: open with O_CLOEXEC if available or set FD_CLOEXEC if not
2017-07-28 11:27:55 +01:00
Iban Cereijo
d040dc18b5 Problem: CMake evaluation fails with Mingw-w64
Solution: we can use 'CMAKE_SYSTEM_VERSION' instead of
'${CMAKE_SYSTEM_VERSION}' for the 'if' clauses.

CMake fails to evaluate condition when CMAKE_SYSTEM_VERSION is
empty, which can happen with a default installation of Mingw-w64
in Linux.
2017-06-14 15:55:29 +02:00
Tim Ebringer
293a18257a Suppress linker warning 4221 for MSVC
Some #define switches cause the body of entire files to be omitted. This
causes a linker warning on Visual Studio 2017, for example

    warning LNK4221: This object file does not define any previously
    undefined public symbols, so it will not be used by any link
    operation that consumes this library

Since this is warning us about something that shouldn't be
earth-shattering news, we add a linker flag to suppress this warning on
MSVC builds.
2017-05-20 14:29:58 -04:00
Yann Diorcet
f66c49a62b Fix precompiled 2017-05-18 12:02:07 +02:00
Yann Diorcet
ec7b9480f5 Fix WITH_DOC 2017-04-28 13:43:17 +02:00
Yann Diorcet
17460b3b2b Targets broken by some parts of f7d1c159d4f96686ce994319280c1bd3a2eab994 2017-04-24 15:57:14 +02:00
RPGillespie6
69b2affe05 Add CMake Build Output Options
Add two new options to CMakeLists.txt:

`BUILD_SHARED` - Whether or not to build the shared object (Default: ON)
`BUILD_STATIC` - Whether or not to build the static archive (Default: ON)
2017-04-17 18:26:04 -04:00
Yann Diorcet
f7d1c159d4 Fix windows compilation 2017-04-12 10:59:04 +02:00
Yann Diorcet
c7fea39005 Fix asciidoc 2017-04-05 14:16:29 +02:00
Stefan Herbrechtsmeier
2f367bddf7 cmake: Remove build/msvc include path to remove file name clash
Remove the `build/msvc` include path from the test project to fix a
problem with the order of the include paths. Additionally remove the
unnecessary `include_directories` from the master project.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
2017-04-05 10:03:07 +02:00
Stefan Herbrechtsmeier
f186421273 cmake: Export targets to package config
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
2017-04-04 15:48:39 +02:00
Stefan Herbrechtsmeier
4e3e3f659d cmake: Disable runtime checks while cross compiling
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
2017-04-04 15:48:39 +02:00
Stefan Herbrechtsmeier
556de55e4c cmake: Use project specific source directory instead of top level source tree
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
2017-04-04 15:48:39 +02:00
bbdb68
1d58a00992 Problem: no windows UWP support
* add define for windows/UWP

* prevent issue with COM references

* gettickcount not available on uwp

* add compiler definitions

* add convenitnece cmake file

* brute force uwp compilation

* fix compiler version

* cosmetics
2017-04-04 09:50:33 +01:00
Luca Boccassi
3ab4796c5a Problem: ZMQ background threads are unnamed
Solution: use pthread API to set the name. For now call every thread
"ZMQ b/g thread". Would be nice to number the I/O threads and name
explicitly the reaper thread, but in reality a bit of internal API
churn would be necessary, so perhaps it's not worth it.
This is useful when debugging a process with many threads.
2017-03-12 00:46:15 +00:00
Luca Boccassi
ac5c75cea1 Problem: 4.2.2 is out, version(s) are out of date
Solution: bump changelog, ABI revision, library and packaging version
2017-02-18 17:56:55 +00:00
Sylvain Corlay
4e472b18e3 Make OS Xframwork build optional 2017-01-27 19:30:18 +01:00
Pawel Kurdybacha
877419e94f CMake static library output does not match ZeroMQ Config.
Configuration used in ZeroMQConfig.cmake.in does not match to
explicic "libzmq" output of static build.
2017-01-22 18:17:55 +00:00
Sylvain Corlay
e38453866d Problem: cmake artefacts different from make generated artefacts 2017-01-21 15:14:30 +01:00
Sylvain Corlay
c65a27213a Problem: name of static library generated by cmake differs from the behavior of kernel.
Solution: Change the target output name from libzmq-static to libzmq.
2017-01-19 13:31:39 +01:00
Johan Mabille
36d0c70647 cmake install on linux fixed 2017-01-13 00:10:32 +01:00
Johan Mabille
7c709e5466 cmake install config file 2017-01-07 00:21:06 +01:00
Johan Mabille
e95d23198f CPack option and .txt files installation dir 2017-01-06 14:29:56 +01:00
Johan Mabille
2d749a066c Windows cmake build fixed 2017-01-06 10:52:20 +01:00
Luca Boccassi
7c0ded93af Problem: 4.2.1 is out, time to bump versions
Solution: add new changelog entry, bump library version in zmq.h and
bump ABI version in configure.ac and CMakeLists.txt
2016-12-31 16:26:41 +01:00
Luca Boccassi
7005f22726 Bugfix release 4.2.1
Finalize changelog and bump ABI revision
2016-12-31 15:55:48 +01:00
Luca Boccassi
f287c7a2aa Problem: eventfd leaks socket on fork+exec
Solution: if available, use eventfd with EFD_CLOEXEC flag to make
the process close the socket on fork+exec
2016-12-26 19:08:27 +01:00
Luca Boccassi
211898d243 Problem: epoll leaks socket on fork+exec
Solution: if available, use epoll_create1 with EPOLL_CLOEXEC flag to
make the process close the socket on fork+exec
2016-12-26 19:08:27 +01:00
Luca Boccassi
abeaba1557 Problem: CMake build uses library version as the ABI version
Solution: set SOVERSION in CMakeLists to match the SONAME generated
by libtool so that there is no mismatch between the output of the
*NIX build systems.

Before:
$ ls -l
total 2696
lrwxrwxrwx 1 luca luca      15 Dec  1 22:36 libzmq.so -> libzmq.so.4.2.0
lrwxrwxrwx 1 luca luca      15 Dec  1 22:36 libzmq.so.4.2.0 -> libzmq.so.4.2.1
-rwxr-xr-x 1 luca luca  906168 Dec  1 22:36 libzmq.so.4.2.1
$ readelf -d libzmq.so.4.2.1 | grep SONAME
 0x000000000000000e (SONAME)    Library soname: [libzmq.so.4.2.0]

After:
$ ls -l
total 2700
lrwxrwxrwx 1 luca luca      15 Dec  1 22:31 libzmq.so -> libzmq.so.5.1.0
-rwxr-xr-x 1 luca luca  906168 Dec  1 22:31 libzmq.so.4.2.1
lrwxrwxrwx 1 luca luca      15 Dec  1 22:31 libzmq.so.5.1.0 -> libzmq.so.4.2.1
$ readelf -d libzmq.so.4.2.1 | grep SONAME
 0x000000000000000e (SONAME)    Library soname: [libzmq.so.5.1.0]
2016-12-01 22:36:40 +00:00
Harald
6f597d0bd3 Problem: CMake build rejects to build with openpgm enabled
Solution: add optional lookup for openpgm via pkg-config
2016-11-01 12:31:40 +01:00
Luca Boccassi
06d810b4c9 Problem: pkg-config Requires.private is broken
Solution: use only Libs.private to avoid breaking application builds.
Even though Requires.private are supposed to be parsed only if
pkg-config is called with --static, the --cflags parameter is enough
to trigger the parsing, causing build failures for applications that
do not (and should not) depend on libzmq's dependencies.
2016-09-27 23:34:35 +01:00
Luca Boccassi
6d9411607d Problem: pkgconfig file does not support static link
Solution: add dependencies, if necessary, to the .private Libs and
Requires field of the pkgconfig file at build time.
This way pkg-config --static --libs libzmq will correctly print
dependencies if they were used to build the static libzmq.a library.
2016-09-27 18:39:07 +01:00
hnwyllmm@126.com
55442699ef replace tabs with space 2016-09-21 11:28:32 +08:00