mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-05-02 07:31:39 +02:00
Merge pull request #236 from kurdybacha/cmake-tweaks
Problem: cppzmq build broken with C++11 compiler and git cloned repo.
This commit is contained in:
commit
3e56f561cc
13
.travis.yml
13
.travis.yml
@ -30,7 +30,18 @@ matrix:
|
||||
# GCC default, draft disabled, default libzmq (defined in ci_build.sh)
|
||||
- os: linux
|
||||
|
||||
# GCC 7, draft enabled (default), latest libzmq (default)
|
||||
# GCC 6, draft disabled (default), latest libzmq (default)
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-6
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
|
||||
|
||||
# GCC 7, draft enabled, latest libzmq (default)
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
|
@ -19,11 +19,7 @@ if (ZeroMQ_FOUND AND (NOT TARGET libzmq OR NOT TARGET libzmq-static))
|
||||
message(FATAL_ERROR "ZeroMQ version not supported!")
|
||||
endif()
|
||||
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||
OPTION (ENABLE_DRAFTS "Build and install draft classes and methods" ON)
|
||||
else ()
|
||||
OPTION (ENABLE_DRAFTS "Build and install draft classes and methods" OFF)
|
||||
endif ()
|
||||
OPTION (ENABLE_DRAFTS "Build and install draft classes and methods" OFF)
|
||||
if (ENABLE_DRAFTS)
|
||||
ADD_DEFINITIONS (-DZMQ_BUILD_DRAFT_API)
|
||||
set (pkg_config_defines "-DZMQ_BUILD_DRAFT_API=1")
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <zmq.hpp>
|
||||
|
||||
#if defined(ZMQ_CPP11)
|
||||
#if defined(ZMQ_BUILD_DRAFT_API) && defined(ZMQ_CPP11)
|
||||
#include <array>
|
||||
|
||||
class loopback_ip4_binder
|
||||
|
Loading…
x
Reference in New Issue
Block a user