Commit Graph

285 Commits

Author SHA1 Message Date
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
Guilherme Steinmann
9c42d28a20 Add static compilation on CMake 2014-07-02 16:51:34 -03:00
Richard Newton
369725ab8f Fix windows build 2014-06-23 13:10:43 +01:00
Telford Berkey
920371ee6b Corrected installer source path for VS pdb debug symbols file. Removed prefix path to platform.h 2014-06-04 08:47:22 -04:00
Richard Newton
1c4cea6c7f Update cmake for split of plain_mechanism 2014-05-12 08:51:13 +01:00
Frank
05ab9a848f find libsodium with cmake 2014-05-09 00:04:19 +02:00
Samuel Martin
d178c71e21 cmake: fix indentation 2014-05-03 21:55:03 +02:00
Samuel Martin
c83d4e01dd cmake: tests: disable test_fork if fork() is not available
fork() support is optional and its availability is correctly detected at
contfigure time.

But test_fork was all always built, preventing build for targets that do
not provide fork() from building successfully.

This pacth fixes the CMakeLists.txt on this point.
2014-05-03 21:55:03 +02:00
Frank
551bcdae6c add metadata 2014-05-01 21:35:53 +02:00
Frank
01afdf8476 no tweetnacl for windows currently 2014-05-01 21:35:36 +02:00
Frank
e5a294ec02 tweetnacl integration 2014-05-01 21:30:02 +02:00
xantares
ce4c4f2a05 Fixed mingw poll detection 2014-04-14 21:49:57 +02:00
Maarten Ditzel
91e77e6aa4 Fix issue #969 2014-04-13 15:25:22 +02:00
Sergei Nikulov
58a1430ca0 fixed msvc dll output path 2014-03-19 22:01:45 +04:00
Frank
9dc890c501 fix test_fork
* was problem on debian/wheezy
2014-03-17 21:21:06 +01:00
Richard Newton
5bd5188ec6 Fix tabs 2014-03-16 16:18:30 +00:00
Richard Newton
05229ea673 Fix cmake build on windows. 2014-03-16 15:59:50 +00:00
Josh Blum
2bc3c82745 add linking to librt under cmake build - fixes missing symbol
The libzmq library itself uses clock_gettime and should link w/ -lrt on linux.
Caught this issue on on Ubuntu 12.04 LTS.
2014-02-24 11:07:28 -08:00
Olaf Mandel
48b50cefb4 Remove duplicate poller decision making
The decision about the poller mechanism to use (select, poll, ...)
was done twice: once by the build system and once by the code in
poller.hpp. As the build-system can actually detect the mechanisms
available, prefer that result to the hard coded defaults in
poller.hpp.

At the same time, remove the duplicate detection of select() vs.
poll()-variant from proxy.cpp, signaler.cpp and zmq.cpp.

This patch has not been tested on many build platforms: especially
the cmake build needs testing / patching. For the other builds,
hard code the result as these these are all Windows platforms.
2014-02-17 14:08:11 +01:00
Josh Blum
b1471da5ac fix libzmq.pc generation under cmake
The ${libdir} was getting replaced/removed by configure_file() making pkg-config give bad flags: -L -lzmq
My fix was to add @ONLY to configure_file() so ${} style pkg-config substitutions are left alone.
In addition, I put the other typical ${} substitutions back into the libzmq.pc, since its now safe.
2014-02-11 15:46:38 -08:00
Gyula Laszlo
7a86b39d63 Added ZMQ_BUILD_TESTS to CMakeLists.txt to allow turning off tests. Useful when building ZMQ as a git submodule. 2014-02-07 17:50:45 +01:00
Richard Newton
0b9a9f7671 Fix cmake build 2014-01-30 13:21:20 +00:00
Tim M
7279429cf1 tabs to spaces 2014-01-20 12:21:07 -08:00
Tim M
de1164255a added test_connect_rid file and added to CMakeLists again. 2014-01-20 12:18:04 -08:00
Ivan Pechorin
ebb51d7922 Fix CMake tests - delete non-existing test_connect_rid 2014-01-20 21:03:45 +13:00
Tim M
1d9b76c860 Added test for ZMQ_CONNECT_RID 2014-01-19 15:59:43 -08:00
Matt Arsenault
5a230f7d9e Fix cmake configure error from deleted test. 2014-01-18 12:59:12 -08:00
Sergei Nikulov
f4a67b2520 fixed cmake merge related to version.rc.in handling 2014-01-16 16:29:12 +04:00
Pieter Hintjens
526847b73b Merge pull request #825 from AndreLouisCaron/disconnect-notifications
Adds support for detecting ZMQ_STREAM disconnections.
2014-01-14 22:25:01 -08:00
Andre Caron
21011541e0 Fixes CMake build after ZAP test file was deleted.
File was removed in 5bf96f64b0 a few days ago.
2014-01-14 17:22:52 -08:00
Andre Caron
17651b9276 Adds support for detecting ZMQ_STREAM disconnections.
When a ZMQ_STREAM socket connection is broken (intentionally, via `shutdown()`
or accidentally via client crash or network failure), there is no way for the
application to dertermine that it should drop per-connection data (such as
buffers).

This contribution makes sure the application receives a 0-length message to
notify it that the connection has been broken.  This is symmetric with the
process of closing the connection from within the application (where the
application sends a 0-length message to tell ZeroMQ to close the connection).

Conflicts:
	CMakeLists.txt
2014-01-14 17:20:46 -08:00
Sergei Nikulov
1904f90284 cmake: fixed error 'install TARGETS given no ARCHIVE DESTINATION for static library target' 2014-01-10 10:47:33 +04:00
Brandon Carpenter
a018ef5e86 Add support for extending ZAP request address with IPC peer credentials.
Another take on LIBZMQ-568 to allow filtering IPC connections, this time
using ZAP.  This change is backward compatible.  If the
ZMQ_ZAP_IPC_CREDS option is set, the user, group, and process IDs of the
peer process are appended to the address (separated by colons) of a ZAP
request; otherwise, nothing changes.  See LIBZMQ-568 and zmq_setsockopt
documentation for more information.
2013-12-06 14:28:44 -08:00
Brandon Carpenter
dc5528cba6 Enable building IPC filtering with cmake. 2013-12-06 10:55:44 -08:00
Richard Newton
abbe704d9e Fix windows build for type of service. 2013-11-25 09:25:23 +00:00
Shannen Saez
8f97f621a8 Move linger test to issue repo.
See https://github.com/zeromq/issues/pull/7

Signed-off-by: Shannen Saez <shannenlaptop@gmail.com>
2013-11-25 14:37:47 +11:00
Richard Newton
f77b96e4d9 Revert "Make FD_SETSIZE = ZMQ_MAX_SOCKETS_DFLT + 1 so there is room for the repear socket."
This reverts commit 0b92831b2a.
2013-11-11 13:09:23 +00:00
Richard Newton
0b92831b2a Make FD_SETSIZE = ZMQ_MAX_SOCKETS_DFLT + 1 so there is room for the repear socket. 2013-11-07 18:26:13 +00:00
Richard Newton
554b3c1f70 Add test case for many sockets 2013-11-07 16:47:55 +00:00
Richard Newton
2b08047d36 Fix formatting issue. 2013-10-29 09:10:00 +00:00
Richard Newton
54a379f966 Clean up dead code in cmake. 2013-10-29 09:07:38 +00:00
Richard Newton
5a74ad56a9 Sync cmake tests with tests in makefile.am 2013-10-29 09:06:24 +00:00
xantares
ffd633b3bb fix use of CMAKE_SYSTEM_PROCESSOR 2013-10-23 20:22:20 +02:00
Richard Newton
8ee2a47267 Add new tests to CMakeLists.txt 2013-10-21 10:06:17 +01:00
Pieter Hintjens
015b43f969 Updated CMake project for test_issue_566 2013-09-26 14:32:47 +02:00
Pieter Hintjens
5e609be345 Renamed new socket options to be clearer
* ZMQ_REQ_STRICT was negative option (default 1) which goes against
  the standard, where defaults are zero. I renamed this to
  ZMQ_REQ_RELAXED.

* ZMQ_REQ_REQUEST_IDS felt clumsy and describes the technical solution
  rather than the problem/requirement. I changed to ZMQ_REQ_CORRELATE
  which seems more explicit.
2013-09-20 15:30:04 +02:00
Pieter Hintjens
92c01f69db Renamed test_connect_delay to test_immediate
* The ZMQ_CONNECT_DELAY option was renamed to ZMQ_IMMEDIATE
2013-09-20 14:23:43 +02:00
Richard Newton
7a747b5797 Fix cmake build 2013-09-19 09:46:26 +01:00
Richard Newton
5f20d63665 First attempt at inproc connect before bind 2013-09-12 14:44:44 +01:00
Richard Newton
64e1c181f7 Implement non-blocking shutdown command that unblocks other threads waiting on blocking operations. 2013-09-10 13:30:00 +01:00
Martin Hurton
498dc37988 Merge pull request #645 from hintjens/master
Updated libzmq to match RFCs
2013-09-06 00:54:51 -07:00
Pieter Hintjens
0a9261472f Removed test_raw_socket 2013-09-04 19:41:33 +02:00
Richard Newton
4696f002ca Fix cmake file for security tests 2013-09-02 23:41:17 +01:00
Richard Newton
da52806d68 Disable failing tests on windows. 2013-08-30 19:04:32 +01:00
Richard Newton
70a1fbee7a Fix running tests from cmake on linux. 2013-08-17 14:39:38 +01:00
Richard Newton
7f74fc7c99 Port tests to windows and add to cmake build. 2013-08-17 13:43:45 +01:00
Steven McCoy
409721b9d2 Add CMake support for static libraries. 2013-07-14 13:58:46 -04:00
Steven McCoy
21fe600848 Move CMake dependencies together. 2013-07-14 13:36:30 -04:00
Steven McCoy
ae86c56d74 README file moved to GitHub format and extension, drop from packaging and default to NEWS file for popup. 2013-07-14 13:26:55 -04:00
Richard Newton
01dd6eb110 Fix cmake build
Fix build on windows, uint isn't a standard type, unsigned int is.
2013-07-01 11:52:39 +01:00
Martin Hurton
37b99c0b4b Implement ZMTP/3.0 CURVE handshake 2013-06-20 13:36:12 +02:00
John Murphy
9bd8d9a726 added missing files required to build 2013-06-16 18:42:51 -05:00
Tommy Back
c69e79706e Fix to building libzmq with CMake as sub-project (git submodule). 2013-03-13 20:27:49 +01:00
Tommy Back
601eedb7f3 Updated CMake building to work after encoder/decoder changes. 2013-03-13 20:10:00 +01:00
Michel Zou
d17567626a Fixed module path with cmake < 2.8.3 2013-02-22 09:01:41 +01:00
Matt Arsenault
e464a91086 Fix using wrong name for windows.h check in cmake 2013-01-27 18:09:53 -05:00
Matt Arsenault
f01bab6633 Fix cmake not linking librt to perf-tools 2013-01-23 14:31:02 -05:00
Matt Arsenault
45f504d3e2 Fix looking for rc sources in toplevel binary directory 2013-01-02 15:50:04 -05:00
Matt Arsenault
3ebab09ce4 Fix unused argument warnings 2013-01-02 03:24:11 -05:00
Matt Arsenault
e88dc49400 Fix random 3 space tabs 2013-01-02 03:24:11 -05:00
Matt Arsenault
59cafecd96 Fix MinGW32 build
Fix link errors when using -m32 with MinGW
2013-01-02 03:24:11 -05:00
Matt Arsenault
3c7d4840a1 Fix NSIS installer errors, MinGW build.
The CPack NSIS installer was in a state where it would always give a
useless error. I think it was using stuff intended for running cpack
separately from cmake.
2013-01-02 03:24:10 -05:00
Matt Arsenault
4704159f73 Fix cmake build with sun studio 2013-01-02 03:24:10 -05:00
Matt Arsenault
74763e2c8e Don't use the toplevel cmake paths so the build works as a subproject 2013-01-02 03:24:10 -05:00
Matt Arsenault
f3901b35d4 Comments about ICC build failure with 12.x were crazy
Fix warnings with ICC.
2013-01-02 03:24:10 -05:00
Matt Arsenault
0362c310a5 First pass at getting cmake build to work with non-Windows systems.
Make doc building option dependent on asciidoc being installed
Fix MSVC build requiring cygwin.
Don't use try_run to get the version
2013-01-02 03:24:10 -05:00
Steven McCoy
2e9d4d4132 Pull upstream OpenPGM 5.2.122 for multi-platform minor fixes. 2012-12-11 21:41:10 -05:00
Steven McCoy
19a8ea4584 Update source list with raw codec. 2012-11-09 08:54:14 -05:00
Steven McCoy
3ba401d7da Bring along CMake patchset from zeromq3-x for adding minor version to Windows labeling. 2012-11-09 08:48:59 -05:00
Steven McCoy
c62fb89ed8 Update to libzmq source set. 2012-10-12 22:48:02 -04:00
Steve-o
7a1a5f9f7f Update AsciiDoc version details with CMake detected ZeroMQ version. 2012-10-12 22:46:59 -04:00
Steve-o
8ddb9fc7ea Enable parallel make and LTO by default. 2012-10-12 22:46:58 -04:00
Steve-o
ebe4eab477 Detect compiler version to tag libraries. 2012-10-12 22:46:55 -04:00
Steve-o
046c8ec7eb Add metadata to CMake options; mark executables advanced to hide from default view; fix WoW64 redirections. 2012-10-12 22:46:54 -04:00
Steve-o
56bb3df1f6 Detect ZeroMQ version at build time; hide NSIS dependencies in new cmake folder. 2012-10-12 22:46:52 -04:00
Steve-o
b42e45adb8 Make OpenPGM a CMake option, default disabled. 2012-10-12 22:46:51 -04:00
Steve-o
c53cf0d239 Minor refactor of CMake build script. 2012-10-12 22:46:50 -04:00
John Murphy
000d1a5fba Update CMakeLists.txt
Removed check for COPYING.txt
2012-10-12 22:46:48 -04:00
John Murphy
58f7c2179f added artificacts for windows and openpgm build 2012-10-12 22:46:47 -04:00