Commit Graph

338 Commits

Author SHA1 Message Date
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 5f17e26fa4.
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
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 f7d1c159d4 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
hnwyllmm@126.com
eee7880752 move the pollset to the position between devpoll and poll 2016-09-21 11:24:26 +08:00
Laughing
45286fa1fe add pollset poller in AIX
add a new poller named pollset which will get benefit of performance in AIX platform.
2016-09-20 10:50:50 +08:00
Thomas Braun
ae08099eb5 Problem: Documentation still has .txt suffix
Solution: The regular expression replacement expected a non-existing
space at the beginning of the input files.
2016-08-28 13:06:36 +02:00
Thomas Braun
1303eea508 Problem: Broken documentation build
Solution: The CMAKE module PythonInterp sets the variable
PYTHONINTERP_FOUND and not PYTHON_FOUND if it finds
a python interpreter.
2016-08-28 13:04:02 +02:00
Ilya Kulakov
8678fcce7c Fix compatibility with newer CMake. 2016-08-15 18:31:12 -07:00
Bitiquinho
3e54ecd49c Added dgram.cpp to CMakeLists.txt sources 2016-05-15 15:35:35 -03:00
hitstergtd
6ea9dbc9ce Problem: No CMake option to set ZMQ_ACT_MILITANT
Solution:
Add CMake option called WITH_MILITANT so that it aligns with the Autotools
build infrastructure; enabling this option defines ZMQ_ACT_MILITANT, which
enables assertions should malformed requests make their way into
zmq_setsockopt(3) or zmq_getsockopt(3).
2016-05-06 20:57:54 +01:00
Luca Boccassi
c33e96f2d2 Merge pull request #1957 from hitstergtd/x-TIPC-CMake-fix
Problem: ZMQ_HAVE_TIPC option for CMake is broken
2016-05-04 16:18:26 +01:00
hitstergtd
b470ed451f Problem: ZMQ_HAVE_TIPC option for CMake is broken
Solution:
Fix it - there was a typo in the source list variable; it should be
'cpp-sources' and not 'cpp-source'.
2016-05-04 16:15:28 +01:00
hitstergtd
6ae2ff6446 Problem: MAINTAINERS file has no purpose anymore
Solution:
Remove until such time that a new and appropriate file can replace it should
it be deemed necessary.
2016-05-04 16:06:33 +01:00
Luca Boccassi
064cd1fbfb Problem: no support for DRAFT API in build systems
Solution: add support for --enable-drafts/ENABLE_DRAFTS=ON in
Autools and CMake.
2016-05-02 21:47:05 +01:00
Hitster GTD
99763cce41 Merge pull request #1909 from somdoron/master
problem: push-pull socket types are not thread safe
2016-04-21 12:54:04 +01:00
somdoron
e6dae56c6e Scatter-Gather socket types 2016-04-21 14:50:58 +03:00
Luca Boccassi
ea294afd8b Problem: CMake does not check for TIPC support
Solution: add macro in ZMQSourceRunChecks.cmake and optionally
include the TIPC sources if the support is available.
More importantly, only run the TIPC tests if the support is there.
2016-04-21 11:33:20 +01:00
Luca Boccassi
f18463f323 Problem: mkdtemp not available on all platforms
Solution: check for availability in autoconf and cmake, and if not
available fall back to random file name rather than random directory.
2016-04-11 00:18:51 +01:00
Pieter Hintjens
6a78b3ec19 Problem: HAVE_LIBSODIUM macro is inconsistent
Solution: use ZMQ_USE_LIBSODIUM to match ZMQ_USE_TWEETNACL
2016-03-30 14:19:20 +02:00
Osiris
cd1dfb4092 Problem: CMakelist missing support for Windows Precompiled headers
Solution: Add precompiled flags to CMakeList.txt for faster compiles
+ bonus - removed compilation warning on Windows by adding
	 add_definitions (-D_WINSOCK_DEPRECATED_NO_WARNINGS)
2016-03-06 06:23:26 -06:00
Luca Boccassi
80650ecfe2 Problem: need to check for C++ standard in cmake
Solution: use CheckCXXCompilerFlag to check for support for
-std=gnu++11
2016-02-19 21:49:38 +00:00
Min RK
d5b66295d4 Deprecate zmq_utils.h
instead of removing it, which breaks downstream builds.
2016-02-18 10:28:07 +01:00
Pieter Hintjens
4a481c857f Problem: socket limit is still 4K on Windows
Solution: fix in CMakeLists.txt (already fixed in builds/msvc)
2016-02-17 12:06:45 +01:00
Luca Boccassi
8bee4e2547 Merge pull request #1799 from hintjens/master
Making gyp builds work
2016-02-12 10:40:43 +00:00
Pieter Hintjens
8230c0d396 Problem: gyp does not build tests
Solution: it's a lot of work to define the tests in project.gyp
so I did this using gsl to generate the JSON, from a small XML
list of the test cases.

To keep this, and the hundreds of .mk files, away from the root
directory, I've moved the gyp files into builds/gyp, where you
would run them.

It all seems to work now. Next up, OS/X and Windows :)
2016-02-12 11:31:38 +01:00
Luca Boccassi
f1c4416e20 Problem: typo in CMakeLists "matches" keyword
Solution: must be upper case
2016-02-11 20:41:18 +00:00
Luca Boccassi
1e6915039f Problem: typo in CMakeLists.txt, can't use sodium
Solution: check for WITH_LIBSODIUM configure option instead of
WITH_SODIUM
2016-02-11 20:40:34 +00:00
Pieter Hintjens
f8ed793f76 Problem: tweetnacl sources are a mess
- they have no copyright / license statement
- they are in some randomish directory structure
- they are a mix of postable and non-portable files
- they do not conform to conditional compile environment

Overall, it makes it rather more work than needed, in build scripts.

Solution: clean up tweetnacl sauce.

- merged code into single tweetnacl.c and .h
- standard copyright header, DJB to AUTHORS
- moved into src/ along with all other source files
- all system and conditional compilation hidden in these files
- thus, they can be compiled and packaged in all cases
- ZMQ_USE_TWEETNACL is set when we're using built-in tweetnacl
- HAVE_LIBSODIUM is set when we're using external libsodium
2016-02-11 18:06:07 +01:00
Pieter Hintjens
ddbbe3b47c Problem: cmake fails with #error None of the ZMQ_USE_* macros defined
This happens if you first configure with autotools, and then run
cmake. The problem is that the compiler finds the old src/platform.hpp
before looking for the one generated by CMake. Further, there are a
set of macros that configure passes via the command line, yet CMake
passes via platform.hpp. (HAVE_xxx for pollers, at least.) This means
you can't do a CMake build using the autotools platform.hpp.

Solution: remove any src/platform.hpp when running cmake. This is a
workaround. I'll fix the inconsistent macros separately.
2016-02-11 13:38:02 +01:00
Pieter Hintjens
b49a60410a Problem: use of libsodium vs. tweetnacl is confused
It's unclear which we need and in the source code, conditional code
treats tweetnacl as a subclass of libsodium, which is inaccurate.

Solution: redesign the configure/cmake API for this:

* tweetnacl is present by default and cannot be enabled
* libsodium can be enabled using --with-libsodium, which replaces
  the built-in tweetnacl
* CURVE encryption can be disabled entirely using --enable-curve=no

The macros we define in platform.hpp are:

    ZMQ_HAVE_CURVE    1        //  When CURVE is enabled
    HAVE_LIBSODIUM    1        //  When we are using libsodium
    HAVE_TWEETNACL    1        //  When we're using tweetnacl (default)

As of this patch, the default build of libzmq always has CURVE
security, and always uses tweetnacl.
2016-02-11 13:32:01 +01:00
Luca Boccassi
918c1ec620 Problem: CMake uses command added in 2.8.12
Solution: bump CMake required version to 2.8.12 to avoid:

CMake Error at tests/CMakeLists.txt:110 (target_include_directories):
  Unknown CMake command "target_include_directories".
2016-02-08 13:13:55 +00:00
Constantin Rack
7da3ee138e Problem: deprecated zmq_utils.h is still included
Solution: remove all remaining references to `zmq_utils.h`
2016-02-01 11:34:36 +01:00
somdoron
5ebfd1728f make udp support for radio-dish 2016-01-29 21:17:11 +02:00
somdoron
b8425a25cf radio-dish pattern 2016-01-27 18:22:48 +02:00
Ilya Kulakov
bfbb655491 Add support for the RelWithDebInfo CMake configuration.
It's now possible to build Release version with pdb file.
2016-01-14 18:20:00 +06:00
Ilya Kulakov
0475c6dfd8 CMAKE_VS_PLATFORM_TOOLSET may not be set.
E.g. for nmake.
2015-12-18 20:50:41 +06:00
Constantin Rack
c19470ece1 Merge pull request #1675 from somdoron/Timers
Problem: no way to schedule timers with zmq_poll or zmq_poller
2015-12-18 11:34:39 +01:00
somdoron
aadaf99011 add timers API to libzmq 2015-12-18 12:23:22 +02:00
Ilya Kulakov
923645060a Fix redirecting location of pdb via CMAKE_PDB_OUTPUT_DIRECTORY. 2015-12-18 14:52:17 +06:00
Ilya Kulakov
68b13fbddb Add the VMCI transport.
VMCI transport allows fast communication between the Host
and a virtual machine, between virtual machines on the same host,
and within a virtual machine (like IPC).

It requires VMware to be installed on the host and Guest Additions
to be installed on a guest.
2015-12-08 13:16:09 +06:00
Anonymous Maarten
89338f43d5 CMake: fix library name on linux
problem: cmake added a prefix of lib to libzmq, resulting in
liblibzmq.so
solution: set an empty prefix
2015-10-25 01:14:27 +02:00
Anonymous Maarten
2f63231860 cmake: libzmq can now be built with both sodium and TweetNaCL 2015-10-24 00:16:01 +02:00
Anonymous Maarten
b2c87b9a70 TweetNaCL: add windows randombytes implementation 2015-10-23 23:34:53 +02:00
Anonymous Maarten
55ca9c5654 CMake: use libsodium if available, else use tweet_nacl 2015-10-23 04:06:57 +02:00
somdoron
6501b8089f port zpoller to libzmq as zmq_poller 2015-10-18 21:07:23 +03:00
Richard Newton
05d0451e29 Update cmake to support Visual Studio 2015 2015-09-19 14:39:18 +01:00
Richard Newton
3f4f3c1137 Fix windows cmake build 2015-09-14 13:21:20 +01:00
Pieter Hintjens
d416ffcec5 Problem: cannot build single test case in tests
This is due to the mangled include of platform.h, which was to make
CMake happy.

Solution: in CMakeLists.txt, define USING_CMAKE and then look for
platform.h in current directory if that is defined, else look in
../src/ as one would expect.
2015-09-11 16:42:26 -04:00
Matt Bolger
7e09306cb3 -Set signaler_port to 0 which allows the OS to find a free port, rather than crashing if 5905 is in use (https://github.com/zeromq/libzmq/issues/1542)
-Added config.hpp to the source list so it shows up in generated projects
-Remove CMAKE_BUILD_TYPE setting for generators that don't use it
2015-08-21 13:45:59 +10:00
reza.ebrahimi
a50834cbec fixed issue with ticket #1517 (wrong lib output name in MSVC CMake build) and apply some improvements in CMake build system 2015-08-14 18:04:54 +04:30
Jens Auer
3679793601 "zero-copy" raw_decoder
A memcpy is eliminated when receiving data on a ZMQ_STREAM socket. Instead
of receiving into a static buffer and then copying the data into the
buffer malloced in msg_t::init_size, the raw_decoder allocates the memory
for together with the reference-counter and creates a msg_t object
on top of that memory. This saves the memcpy operation.

For small messages, data is still copied and the receive buffer is reused.
2015-07-05 16:05:46 +02:00
Anton Sergeev
5f9b258295 Make CMake option for perf-tools
This allow disable making perf-tools in Release build type

Signed-off-by: Anton Sergeev <Anton.Sergeev@elecard.ru>
2015-05-06 21:25:26 +06:00
Henrik S. Gaßmann
f0a76318f4 REPLACE MSVC VERSION SUFFIX VARIABLE
Replace _zmq_COMPILER with CMAKE_VS_PLATFORM_TOOLSET; so the suffix can
be automagically generated for every MSVC compiler supported by cmake.
2015-05-05 21:39:50 +02:00
xantares
0f24f675f5 set soversion without ZMQ_BUILD_FRAMEWORK 2015-03-11 09:15:40 +00:00
xantares
80044c9ed6 mutualize win32 flags 2015-03-11 09:10:23 +00:00
xantares
7dfa7b7a5d do not mix DLL_EXPORT & ZMQ_STATIC definitions 2015-03-11 09:03:21 +00:00
xantares
1d2b34dbe4 install *.txt in share/zmq 2015-03-11 08:51:59 +00:00
xantares
866e752b04 do not install sources 2015-03-11 08:50:39 +00:00
Doron Somech
a4de3df73e Revert "Bzimmerman cmake" 2015-02-12 21:29:09 +02:00
somdoron
bbdd8662ba thread safety - supporting windows 2015-02-12 18:54:23 +02:00
Bryan Zimmerman
c743bd95b4 changed test tools to compile statically 2015-02-09 13:32:29 -05:00
Bryan Zimmerman
caf4276710 removed packaged export
added version to builds
other cleanup
2015-02-09 10:47:05 -05:00
Bryan Zimmerman
2bb72add49 update to use new find_program syntax 2015-02-06 11:03:14 -05:00
Bryan Zimmerman
552c13616e replace check_library and check_include with find_file and find_library 2015-02-06 10:42:23 -05:00
Telford Berkey
05df7072d6 Merge remote-tracking branch 'remotes/upstream/master' 2015-02-02 10:27:25 -05:00
somdoron
ee962117ef fix jenkins build 2015-02-02 16:42:50 +02:00
Telford Berkey
f78f4e3f73 Changed library name to zmq.lib. 2014-12-12 16:45:29 -05:00
Telford Berkey
5b1b3b56d3 Updated Cmake file to remove ascii doc. 2014-12-09 10:33:15 -05:00
Pieter Hintjens
1acc1b1582 Problem: FD_SETSIZE 1024 is too restrictive under Windows
Solution: increased to 4096 by default for all MSVC builds, for MinGW,
and for CMake.

Note: this is a speculative change, it needs confirmation before we
can keep it. Particularly, there is some doubt that changing this in
libzmq will affect upstream applications using libzmq.dll.
2014-08-23 13:59:53 +02:00
Diego
6537e202d6 moved root CMakeLists.txt tests config to tests/CMakeLists.txt 2014-08-05 13:24:32 +02:00