Tweaks to get building
This commit is contained in:
parent
ba532e0434
commit
10e021052f
|
|
@ -21,7 +21,7 @@ set (SO_VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
|
|||
|
||||
# build options
|
||||
option(AMQP-CPP_BUILD_SHARED "Build shared library. If off, build will be static." OFF)
|
||||
option(AMQP-CPP_LINUX_TCP "Build linux sockets implementation." OFF)
|
||||
option(AMQP-CPP_LINUX_TCP "Build linux sockets implementation." ON)
|
||||
option(AMQP-CPP_BUILD_EXAMPLES "Build amqpcpp examples" OFF)
|
||||
|
||||
# ensure c++11 on all compilers
|
||||
|
|
@ -115,3 +115,9 @@ set(PRIVATE_LIBS "-llibamqpcc")
|
|||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/amqpcpp.pc.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/amqpcpp.pc" @ONLY)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/amqpcpp.pc" DESTINATION lib/pkgconfig)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>
|
||||
$<INSTALL_INTERFACE:include/>
|
||||
)
|
||||
target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS})
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ protected:
|
|||
* @note The handler will get called if a read is cancelled.
|
||||
*/
|
||||
void read_handler(const boost::system::error_code &ec,
|
||||
const std::size_t bytes_transferred,
|
||||
const std::size_t,
|
||||
const std::weak_ptr<Watcher> awpWatcher,
|
||||
TcpConnection *const connection,
|
||||
const int fd)
|
||||
|
|
@ -210,7 +210,7 @@ protected:
|
|||
* @note The handler will get called if a write is cancelled.
|
||||
*/
|
||||
void write_handler(const boost::system::error_code ec,
|
||||
const std::size_t bytes_transferred,
|
||||
const std::size_t,
|
||||
const std::weak_ptr<Watcher> awpWatcher,
|
||||
TcpConnection *const connection,
|
||||
const int fd)
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public:
|
|||
* @param ssl Pointer to the SSL structure that can be inspected
|
||||
* @return bool True to proceed / accept the connection, false to break up
|
||||
*/
|
||||
virtual bool onSecured(TcpConnection *connection, const SSL *ssl)
|
||||
virtual bool onSecured(TcpConnection *, const SSL *)
|
||||
{
|
||||
// default implementation: do not inspect anything, just allow the connection
|
||||
return true;
|
||||
|
|
@ -73,7 +73,7 @@ public:
|
|||
*
|
||||
* @see ConnectionHandler::onNegotiate
|
||||
*/
|
||||
virtual uint16_t onNegotiate(TcpConnection *connection, uint16_t interval)
|
||||
virtual uint16_t onNegotiate(TcpConnection *, uint16_t interval)
|
||||
{
|
||||
// default implementation, suggested heartbeat is ok
|
||||
return interval;
|
||||
|
|
@ -85,7 +85,7 @@ public:
|
|||
* secure TLS connection, and the AMQP login handshake has been completed.
|
||||
* @param connection The TCP connection
|
||||
*/
|
||||
virtual void onConnected(TcpConnection *connection) {}
|
||||
virtual void onConnected(TcpConnection *) {}
|
||||
|
||||
/**
|
||||
* Method that is called when the server sends a heartbeat to the client
|
||||
|
|
@ -93,20 +93,20 @@ public:
|
|||
*
|
||||
* @see ConnectionHandler::onHeartbeat
|
||||
*/
|
||||
virtual void onHeartbeat(TcpConnection *connection) {}
|
||||
virtual void onHeartbeat(TcpConnection *) {}
|
||||
|
||||
/**
|
||||
* Method that is called when the TCP connection ends up in an error state
|
||||
* @param connection The TCP connection
|
||||
* @param message Error message
|
||||
*/
|
||||
virtual void onError(TcpConnection *connection, const char *message) {}
|
||||
virtual void onError(TcpConnection *, const char *) {}
|
||||
|
||||
/**
|
||||
* Method that is called when the TCP connection is closed
|
||||
* @param connection The TCP connection
|
||||
*/
|
||||
virtual void onClosed(TcpConnection *connection) {}
|
||||
virtual void onClosed(TcpConnection *) {}
|
||||
|
||||
/**
|
||||
* Monitor a filedescriptor for readability or writability
|
||||
|
|
|
|||
|
|
@ -82,7 +82,8 @@ public:
|
|||
char byte = 0;
|
||||
|
||||
// send one byte over the pipe - this will wake up the other thread
|
||||
write(_fds[1], &byte, 1);
|
||||
if (write(_fds[1], &byte, 1) == -1)
|
||||
throw std::runtime_error(strerror(errno));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue