Commit Graph

30 Commits

Author SHA1 Message Date
Nicolas Benes
6f7338cb05
Add pkg-config file 2022-07-29 20:52:55 +02:00
Alberto Invernizzi
cdec9dca0c update cmake minimum requirement 2021-06-27 19:15:47 +02:00
Gudmundur Adalsteinsson
7a6c904f94 Problem: Examples are not compiled
Solution: Compile the examples when tests are compiled and using C++11
or greater.
2020-10-10 13:42:00 +00:00
Franz Hollerer
96ce61fab7 [#394] fixes dependency on libzmq libraries
simplified logic according @tau-mask suggestion
2020-09-04 10:13:17 +02:00
Sylvain Corlay
9cb042e711 Also skip if libzmq-static is defined 2020-03-05 13:59:45 +01:00
Sylvain Corlay
8d731ea900 Wrap find_package 2020-03-05 12:26:15 +01:00
Gudmundur Adalsteinsson
ff994d9676 Improved comment on workaround 2020-01-15 18:14:26 +00:00
Gudmundur Adalsteinsson
615380b485
Problem: Invalid 32bit issues when using Conan
Solution: Remove architechture checks from cmake version file

Since this is a header only library there is no need to check for 32 vs 64bits.

See similar problem: https://github.com/onqtam/doctest/pull/225
2020-01-15 10:34:48 +00:00
Simon Giesecke
c69c1f903f Problem: cmake build succeeds even if libzmq not found
Solution: raise a FATAL_ERROR if not found, and improve diagnostic output
2018-05-25 11:13:32 +02:00
Pawel Kurdybacha
380e39856b Problem: draft build not enabled for git repo
cppzmq does not follow other zeromq projects where draft builds are
enabled by default for git repository.

Solution: revert back code where ENABLE_DRAFTS in set to ON if .git
directory exists
2018-05-23 18:34:44 +01:00
Pawel Kurdybacha
099bcfc4a4 Problem: cppzmq build broken with C++11 compiler and git cloned repo.
Default build, ./ci_build.sh without any arguments, which causes to run
with draft disabled, does not work properly for git cloned repository and
C++11 compiler.

Two issues:
1. For git cloned repository ENABLE_DRAFTS is ON by default but libzmq
compiled build without drafts .Travis did not catch that because default build
runs on non C++11 compiler.
2. testutil.hpp does not build because of missing draft guards.

Solution 1: Remove check for presence of .git for enabling draft API as it
is confusing to use with ENABLE_DRAFTS flag and there should be only one
explicit way to enable draft build.

Solution 2: add missing draft guards in testutil.hpp for server/client
socket in use there.

Solution 3: add extra Travis build covering C++11 compiler and non
draft enabled build.
2018-05-20 07:53:56 +01:00
Pawel Kurdybacha
ecbcf10ddf Problem: cppzmq needs to be installed for pkg-config libzmq
Solution: Make sure that FinZeroMQ.cmake is present in cppzmq's build
(binary) directory
2018-05-18 22:36:35 +01:00
Guangyu Zhang
cfe3bafc1f
Fix message using empty version variable 2018-05-08 09:34:35 -04:00
Kleis Auke Wolthuizen
7d8e3ab473 Problem: Missing QUIET option causes a CMake warning
When libzmq is installed via a package manager, it causes a CMake warning when building cppzmq, which can be safely ignored.
2018-05-02 15:24:30 +02:00
Kleis Auke Wolthuizen
0611afecb9 Problem: tests are always building
Add the ability to explicitly not build tests. Option defaults to ON to keep the current behavior, but give the user the option to disable building of tests.
2018-04-19 12:45:29 +02:00
Kleis Auke Wolthuizen
21aad1a92a
Remove unnecessary curly bracket
Will otherwise write `set(PACKAGE_VERSION "4.3.0}")` to `cppzmqConfigVersion.cmake`.
2018-04-17 20:34:29 +02:00
Pawel Kurdybacha
34e5b98917 Problem: Draft build not enabled for git cloned cppzmq.
When cppzmq is build out of source e.g. ${CMAKE_SOURCE_DIR}/build:

mkdir build
cd build
cmake ..

then .git is not found properly, DRAFT build not enabled and poller test
not added to pool of tests.
2018-04-07 15:08:24 +01:00
Simon Giesecke
cc5f4050dc Problem: no build/tests with DRAFT
Solution: added initial test case
2018-04-03 18:41:44 +02:00
Simon Giesecke
63f81e40d6 Problem: code coverage not working
Solution: build tests within cppzmq build, and add separate demo
2018-04-03 18:41:32 +02:00
Simon Giesecke
7a8cc9d7cf Problem: version detection broken, confuses libzmq and cppzmq versions
Solution: Fix version detection and cmake syntax errors
Fixes #182
2018-03-28 12:58:12 +02:00
Jian-Hua Chen
4367591ad6 fix installation source path of FindZeroMQ.cmake
when cppzmq is not the root folder of cmake (i.e., it is embedded in a
super project), CMAKE_SOURCE_DIR will not be the correct path to copy
FindZeroMQ.cmake.
2018-01-16 16:13:02 +08:00
Min RK
8b92cb82aa fix updated FindZeroMQ
- remove duplicate top-level install
- copy fallback code to cppzmqConfig.cmake.in
2018-01-15 10:43:00 -08:00
Min RK
f4c0c5e6a3 call pkg-config fallback FindZeroMQ.cmake
and add it to CMAKE_MODULE_PATH on failed load

this allows downstream packages that have loaded cppzmq to call find_package(ZeroMQ) and succeed without shipping their own copy of the fallback.

Additionally, a check for if the libzmq target is defined avoids duplicate definitions when called multiple times
2018-01-13 14:13:38 -08:00
Martl
4ad7a811f0 added QUIET to avoid false cmake warning (missing ZeroMQ) 2017-08-17 21:15:23 +02:00
Axel Huebl
d1568bf1e9
Fix #121 CMake Min Version
CMake targets / interfaces need at least CMake 3.0
2017-07-19 10:43:07 +02:00
Axel Huebl
2008da35e6
Pkg-Config Fallback: File
move the new logic to a simple file so we
do not add code duplication
2017-07-18 20:15:41 +02:00
Axel Huebl
217985adf0
CMake: pkg-config Fallback
Try to find installs of `libzmq` that were performed with
autotools with a `pkg-config` fallback.
2017-07-18 14:39:41 +02:00
Stefan Herbrechtsmeier
aa850e7ec2 cmake: Export targets to package config
Export CMake targets to package config via interface libraries. This
allows the user to simple depends on this project and thereby gets
the additionally dependencies like ZeroMQ automatically.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
2017-04-05 11:10:18 +02:00
Johan Mabille
15936cde8c setting cppzmq version to the one of libzmq 2017-01-10 18:10:09 +01:00
Johan Mabille
30c44492c2 cmake files for installation 2017-01-09 11:47:54 +01:00