mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-19 18:03:50 +00:00
Merge pull request #1910 from bluca/tipc
Problem: CMake CI does not run make test, and there is no checking for TIPC
This commit is contained in:
commit
bf50f9fe75
@ -282,6 +282,7 @@ zmq_check_tcp_keepcnt ()
|
|||||||
zmq_check_tcp_keepidle ()
|
zmq_check_tcp_keepidle ()
|
||||||
zmq_check_tcp_keepintvl ()
|
zmq_check_tcp_keepintvl ()
|
||||||
zmq_check_tcp_keepalive ()
|
zmq_check_tcp_keepalive ()
|
||||||
|
zmq_check_tcp_tipc ()
|
||||||
|
|
||||||
|
|
||||||
if ( CMAKE_SYSTEM_NAME MATCHES "Linux"
|
if ( CMAKE_SYSTEM_NAME MATCHES "Linux"
|
||||||
@ -550,6 +551,11 @@ if (WITH_VMCI)
|
|||||||
list (APPEND cxx-sources vmci_address.cpp vmci_connecter.cpp vmci_listener.cpp vmci.cpp)
|
list (APPEND cxx-sources vmci_address.cpp vmci_connecter.cpp vmci_listener.cpp vmci.cpp)
|
||||||
endif (WITH_VMCI)
|
endif (WITH_VMCI)
|
||||||
|
|
||||||
|
if (ZMQ_HAVE_TIPC)
|
||||||
|
add_definitions (-DZMQ_HAVE_TIPC)
|
||||||
|
list (APPEND cxx-source tipc_address.cpp tipc_connecter.cpp tipc_listener.cpp)
|
||||||
|
endif (ZMQ_HAVE_TIPC)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# source generators
|
# source generators
|
||||||
|
|
||||||
|
@ -127,3 +127,37 @@ int main(int argc, char *argv [])
|
|||||||
"
|
"
|
||||||
ZMQ_HAVE_TCP_KEEPALIVE)
|
ZMQ_HAVE_TCP_KEEPALIVE)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
macro(zmq_check_tcp_tipc)
|
||||||
|
message(STATUS "Checking whether TIPC is supported")
|
||||||
|
check_c_source_runs(
|
||||||
|
"
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <linux/tipc.h>
|
||||||
|
|
||||||
|
int main(int argc, char *argv [])
|
||||||
|
{
|
||||||
|
struct sockaddr_tipc topsrv;
|
||||||
|
int sd = socket(AF_TIPC, SOCK_SEQPACKET, 0);
|
||||||
|
if (sd == -EAFNOSUPPORT) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
memset(&topsrv, 0, sizeof(topsrv));
|
||||||
|
topsrv.family = AF_TIPC;
|
||||||
|
topsrv.addrtype = TIPC_ADDR_NAME;
|
||||||
|
topsrv.addr.name.name.type = TIPC_TOP_SRV;
|
||||||
|
topsrv.addr.name.name.instance = TIPC_TOP_SRV;
|
||||||
|
fcntl(sd, F_SETFL, O_NONBLOCK);
|
||||||
|
if (connect(sd, (struct sockaddr *)&topsrv, sizeof(topsrv)) != 0) {
|
||||||
|
if (errno != EINPROGRESS)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"
|
||||||
|
ZMQ_HAVE_TIPC)
|
||||||
|
endmacro()
|
||||||
|
@ -28,4 +28,4 @@ elif [ $CURVE == "libsodium" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Build, check, and install from local source
|
# Build, check, and install from local source
|
||||||
( cd ../..; mkdir build_cmake && cd build_cmake && PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig cmake "${CMAKE_OPTS[@]}" .. && make all VERBOSE=1 && make install ) || exit 1
|
( cd ../..; mkdir build_cmake && cd build_cmake && PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig cmake "${CMAKE_OPTS[@]}" .. && make all VERBOSE=1 && make install && make test ) || exit 1
|
||||||
|
@ -93,6 +93,9 @@ if(NOT WIN32)
|
|||||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
list(APPEND tests
|
list(APPEND tests
|
||||||
test_abstract_ipc
|
test_abstract_ipc
|
||||||
|
)
|
||||||
|
if(ZMQ_HAVE_TIPC)
|
||||||
|
list(APPEND tests
|
||||||
test_pair_tipc
|
test_pair_tipc
|
||||||
test_reqrep_device_tipc
|
test_reqrep_device_tipc
|
||||||
test_reqrep_tipc
|
test_reqrep_tipc
|
||||||
@ -104,6 +107,7 @@ if(NOT WIN32)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WITH_VMCI)
|
if(WITH_VMCI)
|
||||||
list(APPEND tests
|
list(APPEND tests
|
||||||
|
Loading…
x
Reference in New Issue
Block a user