Skip to content

Commit 3e56f56

Browse files
authored
Merge pull request #236 from kurdybacha/cmake-tweaks
Problem: cppzmq build broken with C++11 compiler and git cloned repo.
2 parents d487e67 + 099bcfc commit 3e56f56

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.travis.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,18 @@ matrix:
3030
# GCC default, draft disabled, default libzmq (defined in ci_build.sh)
3131
- os: linux
3232

33-
# GCC 7, draft enabled (default), latest libzmq (default)
33+
# GCC 6, draft disabled (default), latest libzmq (default)
34+
- os: linux
35+
addons:
36+
apt:
37+
sources:
38+
- ubuntu-toolchain-r-test
39+
packages:
40+
- g++-6
41+
env:
42+
- MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
43+
44+
# GCC 7, draft enabled, latest libzmq (default)
3445
- os: linux
3546
addons:
3647
apt:

CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ if (ZeroMQ_FOUND AND (NOT TARGET libzmq OR NOT TARGET libzmq-static))
1919
message(FATAL_ERROR "ZeroMQ version not supported!")
2020
endif()
2121

22-
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
23-
OPTION (ENABLE_DRAFTS "Build and install draft classes and methods" ON)
24-
else ()
25-
OPTION (ENABLE_DRAFTS "Build and install draft classes and methods" OFF)
26-
endif ()
22+
OPTION (ENABLE_DRAFTS "Build and install draft classes and methods" OFF)
2723
if (ENABLE_DRAFTS)
2824
ADD_DEFINITIONS (-DZMQ_BUILD_DRAFT_API)
2925
set (pkg_config_defines "-DZMQ_BUILD_DRAFT_API=1")

tests/testutil.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <gtest/gtest.h>
44
#include <zmq.hpp>
55

6-
#if defined(ZMQ_CPP11)
6+
#if defined(ZMQ_BUILD_DRAFT_API) && defined(ZMQ_CPP11)
77
#include <array>
88

99
class loopback_ip4_binder

0 commit comments

Comments
 (0)