Commit Graph

248 Commits

Author SHA1 Message Date
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 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