Permalink
Browse files

Problem: Zyre out of date with zproject.

Solution: Regenerate
  • Loading branch information...
twhittock committed Aug 11, 2016
1 parent ce86d4f commit 6a7edb58b0b409e5658bb4aca60ad84c85f49a60
View
@@ -12,6 +12,9 @@ enable_language(C)
enable_testing()
set(SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
# Select flags
SET(CMAKE_C_FLAGS_RELEASE "-O3")
########################################################################
# options
@@ -275,8 +278,14 @@ set_target_properties(
########################################################################
# tests
########################################################################
set(CLASSTEST_TIMEOUT 5 CACHE STRING "Timeout of the selftest of a class")
set(TOTAL_TIMEOUT 20 CACHE STRING "Timout of the total testsuite")
set(CLASSTEST_TIMEOUT 60 CACHE STRING "Timeout of the selftest of a class")
set(TOTAL_TIMEOUT 600 CACHE STRING "Timout of the total testsuite")
if(UNIX)
find_program(MEMORYCHECK_COMMAND valgrind)
set(MEMORYCHECK_COMMAND_OPTIONS "--leak-check=full --show-reachable=yes --error-exitcode=1")
set(MEMORYCHECK_SUPPRESSIONS_FILE "${SOURCE_DIR}/src/.valgrind.supp")
endif()
set(TEST_CLASSES
zyre_peer
@@ -303,12 +312,81 @@ foreach(TEST_CLASS ${TEST_CLASSES})
)
endforeach(TEST_CLASS)
include(CTest)
########################################################################
# cleanup
########################################################################
add_custom_target (distclean @echo Cleaning for source distribution)
set(cmake_generated ${CMAKE_BINARY_DIR}/CMakeCache.txt
${CMAKE_BINARY_DIR}/cmake_install.cmake
${CMAKE_BINARY_DIR}/Makefile
${CMAKE_BINARY_DIR}/CMakeFiles
${CMAKE_BINARY_DIR}/CTestTestfile.cmake
${CMAKE_BINARY_DIR}/DartConfiguration.tcl
${CMAKE_BINARY_DIR}/Testing
${CMAKE_BINARY_DIR}/compile_commands.json
${CMAKE_BINARY_DIR}/src/platform.h
${CMAKE_BINARY_DIR}/src/libzyre.pc
${CMAKE_BINARY_DIR}/src/libzyre.so
${CMAKE_BINARY_DIR}/src/zyre_selftest
${CMAKE_BINARY_DIR}/src/perf_local
${CMAKE_BINARY_DIR}/src/perf_remote
${CMAKE_BINARY_DIR}/src/zpinger
${CMAKE_BINARY_DIR}/src/ztester_beacon
${CMAKE_BINARY_DIR}/src/ztester_gossip
${CMAKE_BINARY_DIR}/src/zyre_selftest
)
add_custom_command(
DEPENDS clean
COMMENT "distribution clean"
COMMAND rm
ARGS -rf CMakeTmp ${cmake_generated}
TARGET distclean
)
########################################################################
# summary
########################################################################
message (STATUS "*** Version number: ${VERSION}")
message (STATUS "*** Install target: ${CMAKE_INSTALL_PREFIX}")
message ("")
message (STATUS "******************* Configuration Summary *******************")
message (STATUS "General:")
message (STATUS " Version : ${VERSION}")
message (STATUS " System : ${CMAKE_SYSTEM_NAME}")
message (STATUS " C compiler : ${CMAKE_C_COMPILER}")
message (STATUS " Debug C flags : ${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS}")
message (STATUS " Release C flags : ${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS}")
message (STATUS " Build type : ${CMAKE_BUILD_TYPE}")
IF (ENABLE_DRAFTS)
message (STATUS " Draft API : Yes")
ELSE (ENABLE_DRAFTS)
message (STATUS " Draft API : No")
ENDIF (ENABLE_DRAFTS)
message (STATUS "")
message (STATUS "Dependencies:")
include(FeatureSummary)
feature_summary (WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
message (STATUS "")
message (STATUS "Install:")
message (STATUS " Install prefix :" "${CMAKE_INSTALL_PREFIX}")
message (STATUS "")
message (STATUS "************************* Options ***************************")
message (STATUS "Options:")
message (STATUS " Use the Draft API (default = yes):")
message (STATUS " -DENABLE-DRAFTS=[yes|no]")
message (STATUS "")
message (STATUS "*************************************************************")
message (STATUS "Configuration complete! Now procced with:")
message (STATUS " 'make' compile the project")
message (STATUS " 'make test' run the project's selftest")
message (STATUS " 'make install' install the project to ${CMAKE_INSTALL_PREFIX}")
message (STATUS "")
message (STATUS "Further options are:")
message (STATUS " 'ctest -T memcheck' run the project's selftest with")
message (STATUS " valgrind to check for memory leaks")
message (STATUS "")
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
View
@@ -10,6 +10,8 @@ if (NOT MSVC)
pkg_check_modules(PC_CZMQ "libczmq")
endif (NOT PC_CZMQ_FOUND)
if (PC_CZMQ_FOUND)
# add CFLAGS from pkg-config file, e.g. draft api.
add_definitions(${PC_CZMQ_CFLAGS} ${PC_CZMQ_CFLAGS_OTHER})
# some libraries install the headers is a subdirectory of the include dir
# returned by pkg-config, so use a wildcard match to improve chances of finding
# headers and SOs.
View
@@ -10,6 +10,8 @@ if (NOT MSVC)
pkg_check_modules(PC_LIBZMQ "libzmq")
endif (NOT PC_LIBZMQ_FOUND)
if (PC_LIBZMQ_FOUND)
# add CFLAGS from pkg-config file, e.g. draft api.
add_definitions(${PC_LIBZMQ_CFLAGS} ${PC_LIBZMQ_CFLAGS_OTHER})
# some libraries install the headers is a subdirectory of the include dir
# returned by pkg-config, so use a wildcard match to improve chances of finding
# headers and SOs.
@@ -40,7 +40,9 @@ public void close () {
self = 0;
}
/*
Returns event type, as printable uppercase string
Returns event type, as printable uppercase string. Choices are:
"ENTER", "EXIT", "JOIN", "LEAVE", "EVASIVE", "WHISPER" and "SHOUT"
and for the local node: "STOP"
*/
native static String __type (long self);
public String type () {
@@ -285,7 +285,9 @@ Methods:
string my_zyre_event.type ()
```
Returns event type, as printable uppercase string
Returns event type, as printable uppercase string. Choices are:
"ENTER", "EXIT", "JOIN", "LEAVE", "EVASIVE", "WHISPER" and "SHOUT"
and for the local node: "STOP"
```
string my_zyre_event.peerUuid ()
@@ -451,7 +451,9 @@ def __nonzero__(self):
def type(self):
"""
Returns event type, as printable uppercase string
Returns event type, as printable uppercase string. Choices are:
"ENTER", "EXIT", "JOIN", "LEAVE", "EVASIVE", "WHISPER" and "SHOUT"
and for the local node: "STOP"
"""
return lib.zyre_event_type(self._as_parameter_)
@@ -207,7 +207,9 @@
void
zyre_event_destroy (zyre_event_t **self_p);
// Returns event type, as printable uppercase string
// Returns event type, as printable uppercase string. Choices are:
// "ENTER", "EXIT", "JOIN", "LEAVE", "EVASIVE", "WHISPER" and "SHOUT"
// and for the local node: "STOP"
const char *
zyre_event_type (zyre_event_t *self);
@@ -9,7 +9,9 @@
///
// Returns event type, as printable uppercase string
// Returns event type, as printable uppercase string. Choices are:
// "ENTER", "EXIT", "JOIN", "LEAVE", "EVASIVE", "WHISPER" and "SHOUT"
// and for the local node: "STOP"
const QString QmlZyreEvent::type () {
return QString (zyre_event_type (self));
};
@@ -28,7 +28,9 @@ class QmlZyreEvent : public QObject
static QObject* qmlAttachedProperties(QObject* object); // defined in QmlZyreEvent.cpp
public slots:
// Returns event type, as printable uppercase string
// Returns event type, as printable uppercase string. Choices are:
// "ENTER", "EXIT", "JOIN", "LEAVE", "EVASIVE", "WHISPER" and "SHOUT"
// and for the local node: "STOP"
const QString type ();
// Return the sending peer's uuid as a string
@@ -32,7 +32,9 @@ QZyreEvent::~QZyreEvent ()
}
///
// Returns event type, as printable uppercase string
// Returns event type, as printable uppercase string. Choices are:
// "ENTER", "EXIT", "JOIN", "LEAVE", "EVASIVE", "WHISPER" and "SHOUT"
// and for the local node: "STOP"
const QString QZyreEvent::type ()
{
const QString rv = QString (zyre_event_type (self));
@@ -25,7 +25,9 @@ class QT_ZYRE_EXPORT QZyreEvent : public QObject
// Destructor; destroys an event instance
~QZyreEvent ();
// Returns event type, as printable uppercase string
// Returns event type, as printable uppercase string. Choices are:
// "ENTER", "EXIT", "JOIN", "LEAVE", "EVASIVE", "WHISPER" and "SHOUT"
// and for the local node: "STOP"
const QString type ();
// Return the sending peer's uuid as a string
@@ -94,7 +94,9 @@ def destroy()
result
end
# Returns event type, as printable uppercase string
# Returns event type, as printable uppercase string. Choices are:
# "ENTER", "EXIT", "JOIN", "LEAVE", "EVASIVE", "WHISPER" and "SHOUT"
# and for the local node: "STOP"
#
# @return [String]
def type()
View
@@ -1,6 +1,5 @@
#!/usr/bin/env bash
set -x
set -ex
mkdir tmp
BUILD_PREFIX=$PWD/tmp
@@ -12,6 +11,8 @@ CONFIG_OPTS+=("CXXFLAGS=-I${BUILD_PREFIX}/include")
CONFIG_OPTS+=("LDFLAGS=-L${BUILD_PREFIX}/lib")
CONFIG_OPTS+=("PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig")
CONFIG_OPTS+=("--prefix=${BUILD_PREFIX}")
CONFIG_OPTS+=("--with-docs=no")
CONFIG_OPTS+=("--quiet")
CMAKE_OPTS=()
CMAKE_OPTS+=("-DCMAKE_INSTALL_PREFIX:PATH=${BUILD_PREFIX}")
@@ -20,15 +21,36 @@ CMAKE_OPTS+=("-DCMAKE_LIBRARY_PATH:PATH=${BUILD_PREFIX}/lib")
CMAKE_OPTS+=("-DCMAKE_INCLUDE_PATH:PATH=${BUILD_PREFIX}/include")
# Clone and build dependencies
git clone --depth 1 https://github.com/jedisct1/libsodium libsodium
( cd libsodium && ./autogen.sh && ./configure "${CONFIG_OPTS[@]}" && make -j4 && make install ) || exit 1
git clone --depth 1 https://github.com/zeromq/libzmq libzmq
( cd libzmq && ./autogen.sh && ./configure "${CONFIG_OPTS[@]}" && make -j4 && make install ) || exit 1
git clone --depth 1 https://github.com/zeromq/czmq czmq
( cd czmq && ./autogen.sh && ./configure "${CONFIG_OPTS[@]}" && make -j4 && make install ) || exit 1
git clone --quiet --depth 1 https://github.com/zeromq/libzmq libzmq
cd libzmq
git --no-pager log --oneline -n1
if [ -e autogen.sh ]; then
./autogen.sh 2> /dev/null
fi
if [ -e buildconf ]; then
./buildconf 2> /dev/null
fi
./configure "${CONFIG_OPTS[@]}"
make -j4
make install
cd ..
git clone --quiet --depth 1 https://github.com/zeromq/czmq czmq
cd czmq
git --no-pager log --oneline -n1
if [ -e autogen.sh ]; then
./autogen.sh 2> /dev/null
fi
if [ -e buildconf ]; then
./buildconf 2> /dev/null
fi
./configure "${CONFIG_OPTS[@]}"
make -j4
make install
cd ..
# Build and check this project
( 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 ../..
PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig cmake "${CMAKE_OPTS[@]}" .
make all VERBOSE=1 -j4
ctest -V
make install
View
@@ -38,7 +38,9 @@ ZYRE_EXPORT void
zyre_event_destroy (zyre_event_t **self_p);
// *** Draft method, for development use, may change without warning ***
// Returns event type, as printable uppercase string
// Returns event type, as printable uppercase string. Choices are:
// "ENTER", "EXIT", "JOIN", "LEAVE", "EVASIVE", "WHISPER" and "SHOUT"
// and for the local node: "STOP"
ZYRE_EXPORT const char *
zyre_event_type (zyre_event_t *self);

0 comments on commit 6a7edb5

Please sign in to comment.