mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-22 23:24:35 +02:00
Make core-buffer folder with all common stuff used in the buffer
This commit is contained in:
@@ -28,6 +28,7 @@ add_subdirectory(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/googletest-build
|
||||
EXCLUDE_FROM_ALL)
|
||||
|
||||
add_subdirectory("core-buffer")
|
||||
add_subdirectory("core-writer")
|
||||
#add_subdirectory("csaxs")
|
||||
add_subdirectory("sf-writer")
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
file(GLOB SOURCES
|
||||
src/*.cpp)
|
||||
|
||||
add_library(core-buffer STATIC ${SOURCES})
|
||||
target_include_directories(core-buffer PUBLIC include/)
|
||||
target_link_libraries(core-buffer core-writer)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
target_compile_definitions(core-buffer PRIVATE DEBUG_OUTPUT)
|
||||
endif()
|
||||
|
||||
enable_testing()
|
||||
add_subdirectory(test/)
|
||||
@@ -0,0 +1,5 @@
|
||||
add_executable(core-buffer_tests test_main.cpp)
|
||||
|
||||
target_link_libraries(core-buffer_tests
|
||||
core-buffer
|
||||
gtest)
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include "../src/buffer_utils.hpp"
|
||||
#include "buffer_utils.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include "test_UdpReceiver.cpp"
|
||||
#include "test_UdpRecvModule.cpp"
|
||||
#include "test_buffer_utils.cpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
@@ -10,6 +10,7 @@ add_library(core-writer STATIC ${SOURCES})
|
||||
include_directories(core-writer external/)
|
||||
|
||||
target_include_directories(core-writer PUBLIC include/)
|
||||
target_include_directories(core-writer PUBLIC external/)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
target_compile_definitions(core-writer PRIVATE DEBUG_OUTPUT)
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
#include "test_ZmqRecvModule.cpp"
|
||||
#include "test_H5WriteModule.cpp"
|
||||
#include "test_ProcessManager.cpp"
|
||||
#include "test_UdpReceiver.cpp"
|
||||
#include "test_UdpRecvModule.cpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ set_target_properties(sf-buffer PROPERTIES OUTPUT_NAME sf_buffer)
|
||||
target_include_directories(sf-buffer PUBLIC src/)
|
||||
|
||||
target_link_libraries(sf-buffer
|
||||
core-buffer
|
||||
core-writer
|
||||
external
|
||||
zmq
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include "test_buffer_utils.cpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user