Skip to content

Commit

Permalink
Showing 8 changed files with 33 additions and 21 deletions.
20 changes: 14 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -36,6 +36,8 @@ option(SANITISE_BUILD "Enable sanitise options" OFF)
option(COVERAGE_BUILD "Enable code coverage" OFF)
option(AERON_TESTS "Enable tests" ${STANDALONE_BUILD})
option(AERON_BUILD_SAMPLES "Enable building the sample projects" ${STANDALONE_BUILD})
option(AERON_BUILD_DOCUMENTATION "Build Aeron documentation" ${STANDALONE_BUILD})
option(AERON_INSTALL_TARGETS "Enable installation step" ${STANDALONE_BUILD})

unset(STANDALONE_BUILD)

@@ -137,9 +139,13 @@ find_package(Threads)
##########################################################
# Doxygen for generating doc

find_package(Doxygen)
if(AERON_BUILD_DOCUMENTATION)
find_package(Doxygen)
endif()

set(CMAKE_CXX_STANDARD 11)
if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)
endif()

# all UNIX-based platform compiler flags
if(UNIX)
@@ -262,7 +268,7 @@ endif(BUILD_AERON_DRIVER)
##########################################################
# doc target

if(DOXYGEN_FOUND)
if(AERON_BUILD_DOCUMENTATION AND DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cppbuild/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)

add_custom_target(
@@ -272,9 +278,11 @@ if(DOXYGEN_FOUND)
COMMENT "Generating API documentation with Doxygen" VERBATIM
)

# install the doc if it has been built
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION share OPTIONAL)
endif(DOXYGEN_FOUND)
if(AERON_INSTALL_TARGETS)
# install the doc if it has been built
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION share OPTIONAL)
endif()
endif()

##########################################################
# package target
6 changes: 4 additions & 2 deletions aeron-client/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -136,5 +136,7 @@ target_link_libraries(aeron_client
INTERFACE ${CMAKE_THREAD_LIBS_INIT}
)

install(TARGETS aeron_client ARCHIVE DESTINATION lib)
install(DIRECTORY . DESTINATION include FILES_MATCHING PATTERN "*.h")
if (AERON_INSTALL_TARGETS)
install(TARGETS aeron_client ARCHIVE DESTINATION lib)
install(DIRECTORY . DESTINATION include FILES_MATCHING PATTERN "*.h")
endif()
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/ExclusivePublication.h
Original file line number Diff line number Diff line change
@@ -119,7 +119,7 @@ class ExclusivePublication
}

/**
* Registration Id returned by Aeron::addPublication when this Publication was added.
* Registration Id returned by Aeron::addExclusivePublication when this Publication was added.
*
* @return the registrationId of the publication.
*/
2 changes: 1 addition & 1 deletion aeron-client/src/main/cpp/Subscription.h
Original file line number Diff line number Diff line change
@@ -472,7 +472,7 @@ class Subscription
/// @endcond

/**
* Get the status for the channel of this {@link Publication}
* Get the status for the channel of this {@link Subscription}
*
* @return status code for this channel
*/
Original file line number Diff line number Diff line change
@@ -426,7 +426,6 @@ TEST(OneToOneRingBufferConcurrentTest, shouldExchangeMessages)
OneToOneRingBuffer ringBuffer(spscAb);

std::atomic<int> countDown(1);
std::atomic<int> publisherId(0);

std::vector<std::thread> threads;

14 changes: 8 additions & 6 deletions aeron-driver/src/main/c/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -281,9 +281,11 @@ target_link_libraries(
${AERON_LIB_M_LIBS}
${CMAKE_THREAD_LIBS_INIT})

install(
TARGETS aeron_driver aeron_driver_agent
RUNTIME DESTINATION lib
LIBRARY DESTINATION lib)
install(TARGETS aeronmd DESTINATION bin)
install(DIRECTORY . DESTINATION include/aeronmd FILES_MATCHING PATTERN "*.h")
if (AERON_INSTALL_TARGETS)
install(
TARGETS aeron_driver aeron_driver_agent
RUNTIME DESTINATION lib
LIBRARY DESTINATION lib)
install(TARGETS aeronmd DESTINATION bin)
install(DIRECTORY . DESTINATION include/aeronmd FILES_MATCHING PATTERN "*.h")
endif()
1 change: 0 additions & 1 deletion aeron-driver/src/test/c/aeron_spsc_rb_test.cpp
Original file line number Diff line number Diff line change
@@ -387,7 +387,6 @@ TEST(SpscRbConcurrentTest, shouldExchangeMessages)
ASSERT_EQ(aeron_spsc_rb_init(&rb, spsc_buffer.data(), spsc_buffer.size()), 0);

std::atomic<int> countDown(1);
std::atomic<int> publisherId(0);

std::vector<std::thread> threads;
size_t msgCount = 0;
8 changes: 5 additions & 3 deletions aeron-samples/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -77,6 +77,8 @@ target_link_libraries(PingPong

add_dependencies(PingPong hdr_histogram)

install(
TARGETS AeronStat BasicPublisher TimeTests BasicSubscriber StreamingPublisher RateSubscriber Ping Pong Throughput ErrorStat ExclusiveThroughput PingPong
DESTINATION bin)
if (AERON_INSTALL_TARGETS)
install(
TARGETS AeronStat BasicPublisher TimeTests BasicSubscriber StreamingPublisher RateSubscriber Ping Pong Throughput ErrorStat ExclusiveThroughput PingPong
DESTINATION bin)
endif()

0 comments on commit 8253ca0

Please sign in to comment.