<commit_before>CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

PROJECT(SimpleAmqpClient)

#SET(Boost_DEBUG TRUE)
#SET(Boost_DETAILED_FAILURE_MSG TRUE)
SET(Boost_ADDITIONAL_VERSIONS "1.44.0" "1.46.1")

FIND_PACKAGE(Boost 1.44.0 COMPONENTS thread REQUIRED)

SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Modules)
FIND_PACKAGE(Rabbitmqc REQUIRED)

INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}
					${Rabbitmqc_INCLUDE_DIRS}
					${CMAKE_CURRENT_SOURCE_DIR}
					${CMAKE_CURRENT_BINARY_DIR})

ADD_DEFINITIONS(-DBUILDING_SIMPLEAMQPCLIENT)

# We need winsock32 if we're compiling on windows
IF (WIN32)
	SET(SOCKET_LIBRARY ws2_32)
ENDIF()

INCLUDE (CheckIncludeFile)
INCLUDE (CheckFunctionExists)

CHECK_FUNCTION_EXISTS(strerror_s HAVE_STRERROR_S)
SET(CMAKE_REQUIRED_DEFINITIONS "-D_XOPEN_SOURCE=600")
CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R)
UNSET(CMAKE_REQUIRED_DEFINITIONS)

CHECK_INCLUDE_FILE(winsock2.h HAVE_WINSOCK2_H)
CHECK_INCLUDE_FILE(sys/socket.h HAVE_SYS_SOCKET_H)

CONFIGURE_FILE(config.h.in config.h)

SET(SAC_LIB_SRCS
	SimpleAmqpClient.h

    Channel.h
    Channel.cpp

    BasicMessage.h
    BasicMessage.cpp

    Util.h
    Util.cpp

    AmqpResponseLibraryException.h
    AmqpResponseLibraryException.cpp

    AmqpResponseServerException.h
    AmqpResponseServerException.cpp

	SimpleRpcClient.h
	SimpleRpcClient.cpp

	SimpleRpcServer.h
	SimpleRpcServer.cpp

	SimplePublisher.h
	SimplePublisher.cpp

	SimpleSubscriber.h
	SimpleSubscriber.cpp

	SimpleTwoWayChannel.h
	SimpleTwoWayChannel.cpp

	UmroBrokerConfiguration.h
	UmroBrokerConfiguration.cpp
	)



ADD_LIBRARY(simple-amqp-client-static STATIC ${SAC_LIB_SRCS})
ADD_LIBRARY(simple-amqp-client-shared SHARED ${SAC_LIB_SRCS})

SET_TARGET_PROPERTIES(simple-amqp-client-static PROPERTIES OUTPUT_NAME SimpleAmqpClient)
SET_TARGET_PROPERTIES(simple-amqp-client-shared PROPERTIES OUTPUT_NAME SimpleAmqpClient)

TARGET_LINK_LIBRARIES(simple-amqp-client-shared ${Rabbitmqc_LIBRARY} ${SOCKET_LIBRARY})

LINK_DIRECTORIES(${Boost_LIBRARY_PATH})
ADD_EXECUTABLE(simple_connect examples/simple_connect.cpp)

TARGET_LINK_LIBRARIES(simple_connect simple-amqp-client-shared)

ADD_EXECUTABLE(consume_with_timeout examples/consume_with_timeout.cpp)

TARGET_LINK_LIBRARIES(consume_with_timeout simple-amqp-client-shared ${Boost_LIBRARIES})

# Documentation generation
SET(DOXYFILE_LATEX "NO")
SET(PROJECT_VERSION "1.0.0")
INCLUDE(UseDoxygen)
<commit_msg>Removing reference to UMRO config files in cmake<commit_after>CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

PROJECT(SimpleAmqpClient)

#SET(Boost_DEBUG TRUE)
#SET(Boost_DETAILED_FAILURE_MSG TRUE)
SET(Boost_ADDITIONAL_VERSIONS "1.44.0" "1.46.1")

FIND_PACKAGE(Boost 1.44.0 COMPONENTS thread REQUIRED)

SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Modules)
FIND_PACKAGE(Rabbitmqc REQUIRED)

INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}
					${Rabbitmqc_INCLUDE_DIRS}
					${CMAKE_CURRENT_SOURCE_DIR}
					${CMAKE_CURRENT_BINARY_DIR})

ADD_DEFINITIONS(-DBUILDING_SIMPLEAMQPCLIENT)

# We need winsock32 if we're compiling on windows
IF (WIN32)
	SET(SOCKET_LIBRARY ws2_32)
ENDIF()

INCLUDE (CheckIncludeFile)
INCLUDE (CheckFunctionExists)

CHECK_FUNCTION_EXISTS(strerror_s HAVE_STRERROR_S)
SET(CMAKE_REQUIRED_DEFINITIONS "-D_XOPEN_SOURCE=600")
CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R)
UNSET(CMAKE_REQUIRED_DEFINITIONS)

CHECK_INCLUDE_FILE(winsock2.h HAVE_WINSOCK2_H)
CHECK_INCLUDE_FILE(sys/socket.h HAVE_SYS_SOCKET_H)

CONFIGURE_FILE(config.h.in config.h)

SET(SAC_LIB_SRCS
	SimpleAmqpClient.h

    Channel.h
    Channel.cpp

    BasicMessage.h
    BasicMessage.cpp

    Util.h
    Util.cpp

    AmqpResponseLibraryException.h
    AmqpResponseLibraryException.cpp

    AmqpResponseServerException.h
    AmqpResponseServerException.cpp

	SimpleRpcClient.h
	SimpleRpcClient.cpp

	SimpleRpcServer.h
	SimpleRpcServer.cpp

	SimplePublisher.h
	SimplePublisher.cpp

	SimpleSubscriber.h
	SimpleSubscriber.cpp

	SimpleTwoWayChannel.h
	SimpleTwoWayChannel.cpp
	)



ADD_LIBRARY(simple-amqp-client-static STATIC ${SAC_LIB_SRCS})
ADD_LIBRARY(simple-amqp-client-shared SHARED ${SAC_LIB_SRCS})

SET_TARGET_PROPERTIES(simple-amqp-client-static PROPERTIES OUTPUT_NAME SimpleAmqpClient)
SET_TARGET_PROPERTIES(simple-amqp-client-shared PROPERTIES OUTPUT_NAME SimpleAmqpClient)

TARGET_LINK_LIBRARIES(simple-amqp-client-shared ${Rabbitmqc_LIBRARY} ${SOCKET_LIBRARY})

LINK_DIRECTORIES(${Boost_LIBRARY_PATH})
ADD_EXECUTABLE(simple_connect examples/simple_connect.cpp)

TARGET_LINK_LIBRARIES(simple_connect simple-amqp-client-shared)

ADD_EXECUTABLE(consume_with_timeout examples/consume_with_timeout.cpp)

TARGET_LINK_LIBRARIES(consume_with_timeout simple-amqp-client-shared ${Boost_LIBRARIES})

# Documentation generation
SET(DOXYFILE_LATEX "NO")
SET(PROJECT_VERSION "1.0.0")
INCLUDE(UseDoxygen)

{'fraction_non_alphanumeric': 0.07924528301886792, 'fraction_numerical': 0.012159329140461216, 'mean_word_length': 7.3848857644991215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2678421', 'n_tokens_mistral': 1957, 'n_tokens_neox': 1783, 'n_words': 229}