-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8063e6f
Showing
8 changed files
with
4,205 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
PROJECT(asio-amqp) | ||
|
||
enable_testing() | ||
set (VERSION_MAJOR 1) | ||
set (VERSION_MINOR 0) | ||
|
||
set(Boost_USE_MULTITHREADED ON) | ||
add_definitions(-DBOOST_LOG_DYN_LINK) | ||
|
||
include(cotire) | ||
include_directories(include/ src/) | ||
|
||
find_package(Boost COMPONENTS system regex thread log unit_test_framework) | ||
find_package(Threads REQUIRED) | ||
|
||
find_package(AMQP REQUIRED) | ||
include_directories(${AMQP_INCLUDE_DIR}) | ||
|
||
add_executable( | ||
amqp_tests | ||
src/amqp_tests.cpp | ||
) | ||
|
||
target_link_libraries( | ||
amqp_tests | ||
${AMQP_LIBRARY} | ||
${Boost_LIBRARIES} | ||
) | ||
set_target_properties(amqp_tests PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "src/stdafx.h") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||
# target_compile_features(amqp_tests PRIVATE cxx_constexpr) | ||
cotire(amqp_tests) | ||
|
||
install( | ||
DIRECTORY include/ | ||
DESTINATION "include" | ||
) | ||
include (CTest) | ||
add_test (boost amqp_tests --log_level=all --log_format=XML --log_sink=amqp_tests.xml) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Find the Rabbitmq C library | ||
|
||
SET(_AMQP_REQUIRED_VARS AMQP_INCLUDE_DIR AMQP_LIBRARY ) | ||
|
||
# Find the include directories | ||
FIND_PATH(AMQP_INCLUDE_DIR | ||
NAMES amqpcpp.h | ||
HINTS ${AMQP_DIR}/include | ||
) | ||
|
||
FIND_LIBRARY(AMQP_LIBRARY | ||
NAMES amqp-cpp | ||
HINTS ${AMQP_DIR}/lib | ||
) | ||
|
||
SET(AMQP_PROCESS_INCLUDES AMQP_INCLUDE_DIR) | ||
SET(AMQP_PROCESS_LIBS AMQP_LIBRARY) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(AMQP DEFAULT_MSG ${_AMQP_REQUIRED_VARS}) |
Oops, something went wrong.