File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7676
7777 - name : Configure and build
7878 run : |
79- cmake . -B build -DSIMPLE_SOCKET_BUILD_TESTS=ON -DSIMPLE_SOCKET_WITH_TLS=OFF -DSIMPLE_SOCKET_WITH_MQTT=OFF -DSIMPLE_SOCKET_WITH_MODBUS=OFF -DCMAKE_BUILD_TYPE="Release"
79+ cmake . -B build -DSIMPLE_SOCKET_BUILD_TESTS=ON -DSIMPLE_SOCKET_WITH_TLS=OFF -DSIMPLE_SOCKET_WITH_MQTT=OFF -DSIMPLE_SOCKET_WITH_MODBUS=OFF -DSIMPLE_SOCKET_WITH_MEMORY=OFF - DCMAKE_BUILD_TYPE="Release"
8080 cmake --build build
8181
8282 - name : Test
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ option(SIMPLE_SOCKET_BUILD_TESTS OFF)
55option (SIMPLE_SOCKET_WITH_TLS "Enable TLS (OpenSSL) for WSS" OFF )
66option (SIMPLE_SOCKET_WITH_MQTT "Enable MQTT support" ON )
77option (SIMPLE_SOCKET_WITH_MODBUS "Enable Modbus support" ON )
8+ option (SIMPLE_SOCKET_WITH_MEMORY "Enable in-memory transport support" ON )
89
910set (CMAKE_CXX_STANDARD 20)
1011
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ set(publicHeaderDir "${PROJECT_SOURCE_DIR}/include")
22
33set (publicHeaders
44
5- "simple_socket/SharedMemoryConnection.hpp"
65 "simple_socket/SimpleConnection.hpp"
76 "simple_socket/SimpleHttpFetcher.hpp"
87 "simple_socket/SocketContext.hpp"
@@ -27,7 +26,6 @@ set(privateHeaders
2726)
2827
2928set (sources
30- "simple_socket/SharedMemoryConnection.cpp"
3129 "simple_socket/SimpleHttpFetcher.cpp"
3230 "simple_socket/SocketContext.cpp"
3331 "simple_socket/TCPSocket.cpp"
@@ -40,6 +38,17 @@ set(sources
4038 "simple_socket/ws/WebSocketClient.cpp"
4139)
4240
41+ if (SIMPLE_SOCKET_WITH_MEMORY)
42+
43+ list (APPEND publicHeaders
44+ "simple_socket/SharedMemoryConnection.hpp"
45+ )
46+
47+ list (APPEND sources
48+ "simple_socket/SharedMemoryConnection.cpp"
49+ )
50+ endif ()
51+
4352if (SIMPLE_SOCKET_WITH_MODBUS)
4453
4554 list (APPEND publicHeaders
Original file line number Diff line number Diff line change @@ -35,9 +35,12 @@ add_executable(test_port_query test_port_query.cpp)
3535add_test (NAME test_port_query COMMAND test_port_query )
3636target_link_libraries (test_port_query PRIVATE simple_socket Catch2::Catch2WithMain )
3737
38- add_executable (test_shared_memory test_shared_memory.cpp )
39- target_link_libraries (test_shared_memory PRIVATE simple_socket Catch2::Catch2WithMain )
40- add_test (NAME test_shared_memory COMMAND test_shared_memory )
38+
39+ if (SIMPLE_SOCKET_WITH_MEMORY)
40+ add_executable (test_shared_memory test_shared_memory.cpp )
41+ target_link_libraries (test_shared_memory PRIVATE simple_socket Catch2::Catch2WithMain )
42+ add_test (NAME test_shared_memory COMMAND test_shared_memory )
43+ endif ()
4144
4245
4346if (UNIX )
You can’t perform that action at this time.
0 commit comments