mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 18:55:10 +01:00
Merge pull request #3140 from bluca/clang_tautological
Problem: build broken with clang 6 on Android NDK 17
This commit is contained in:
commit
bbc903884f
@ -35,6 +35,18 @@ if(COMPILER_SUPPORTS_C11)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
# clang 6 has a warning that does not make sense on multi-platform code
|
||||
CHECK_CXX_COMPILER_FLAG("-Wno-tautological-constant-compare" CXX_HAS_TAUT_WARNING)
|
||||
if(CXX_HAS_TAUT_WARNING)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-tautological-constant-compare")
|
||||
endif()
|
||||
CHECK_C_COMPILER_FLAG("-Wno-tautological-constant-compare" CC_HAS_TAUT_WARNING)
|
||||
if(CC_HAS_TAUT_WARNING)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-tautological-constant-compare")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Will be used to add flags to pkg-config useful when apps want to statically link
|
||||
set (pkg_config_libs_private "")
|
||||
|
||||
|
@ -812,6 +812,12 @@ AM_CONDITIONAL([WITH_CLANG_FORMAT], [$WITH_CLANG_FORMAT])
|
||||
# unittests will not build without the static libzmq.a
|
||||
AM_CONDITIONAL(ENABLE_STATIC, test "x$enable_static" = "xyes")
|
||||
|
||||
# clang 6 has a warning that does not make sense on multi-platform code
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-tautological-constant-compare],
|
||||
[CFLAGS+=" -Wno-tautological-constant-compare" CXXFLAGS+=" -Wno-tautological-constant-compare"],
|
||||
[],
|
||||
[-Werror])
|
||||
|
||||
# Subst LIBZMQ_EXTRA_CFLAGS & CXXFLAGS & LDFLAGS
|
||||
AC_SUBST(LIBZMQ_EXTRA_CFLAGS)
|
||||
AC_SUBST(LIBZMQ_EXTRA_CXXFLAGS)
|
||||
|
@ -255,7 +255,7 @@ zmq::fd_t zmq::tipc_connecter_t::connect ()
|
||||
// Following code should handle both Berkeley-derived socket
|
||||
// implementations and Solaris.
|
||||
int err = 0;
|
||||
#if ZMQ_HAVE_VXWORKS
|
||||
#ifdef ZMQ_HAVE_VXWORKS
|
||||
int len = sizeof (err);
|
||||
#else
|
||||
socklen_t len = sizeof (err);
|
||||
|
Loading…
Reference in New Issue
Block a user