From 4acee206d2082e59bc136e3bbb0d718d0593e2ec Mon Sep 17 00:00:00 2001 From: Richard Hodges Date: Thu, 7 Aug 2014 10:59:37 +0100 Subject: [PATCH] testing - added stub to build a test based on asio --- CMakeLists.txt | 1 + amqp_boost_test/CMakeLists.txt | 37 ++++++++++++++++++++++++++++++++++ amqp_boost_test/main.cpp | 8 ++++++++ 3 files changed, 46 insertions(+) create mode 100644 amqp_boost_test/CMakeLists.txt create mode 100644 amqp_boost_test/main.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index da1c969..4670b58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ endmacro() add_subdirectory(src) add_subdirectory(include) +add_subdirectory(amqp_boost_test) include_directories(${CMAKE_SOURCE_DIR}/include) add_library(amqp-cpp STATIC ${SRCS}) diff --git a/amqp_boost_test/CMakeLists.txt b/amqp_boost_test/CMakeLists.txt new file mode 100644 index 0000000..0669683 --- /dev/null +++ b/amqp_boost_test/CMakeLists.txt @@ -0,0 +1,37 @@ +set(Boost_USE_STATIC_LIBS ON) +set(Boost_USE_MULTITHREADED ON) +set(Boost_USE_STATIC_RUNTIME OFF) +find_package(Boost 1.55 REQUIRED COMPONENTS thread system) + +if(NOT Boost_FOUND) + message( FATAL_ERROR "boost must be installed") +endif() + +include_directories(${Boost_INCLUDE_DIRS}) + +set(SRC main.cpp) + +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") +set(SPECIFIC_HOST_LIBS rt pthread) +else() +set(SPECIFIC_HOST_LIBS) +endif() + +set(LIBS +${Boost_LIBRARIES} +amqp-cpp +) + +include_directories(SYSTEM ${CRYPTLIB_INCLUDE_PATH}) +link_directories(${Boost_LIBRARY_PATH}) + +include_directories(SYSTEM ${AMQP-CPP_INCLUDE_PATH}) + +add_executable(amqp_boost_test ${SRC}) +target_link_libraries(amqp_boost_test ${LIBS} ${SPECIFIC_HOST_LIBS}) + +install(TARGETS amqp_boost_test + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/amqp_boost_test/main.cpp b/amqp_boost_test/main.cpp new file mode 100644 index 0000000..0dd80bc --- /dev/null +++ b/amqp_boost_test/main.cpp @@ -0,0 +1,8 @@ +#include + +int main(int argc, const char* argv[]) +{ + + + return 0; +} \ No newline at end of file