Add thin abstraction layer for network sockets
This makes SocketProfilingConnection and GatordMock work on Windows as
well as Linux
Change-Id: I4b10c079b653a1c3f61eb20694e5b5f8a6f5fdfb
Signed-off-by: Robert Hughes <robert.hughes@arm.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d54137..e39c2b8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,6 +65,8 @@
src/armnnUtils/QuantizeHelper.hpp
src/armnnUtils/TensorIOUtils.hpp
src/armnnUtils/TensorUtils.cpp
+ src/armnnUtils/NetworkSockets.hpp
+ src/armnnUtils/NetworkSockets.cpp
)
add_library_ex(armnnUtils STATIC ${armnnUtils_sources})
@@ -533,6 +535,9 @@
target_link_libraries(armnn armnnUtils)
target_link_libraries(armnn ${CMAKE_DL_LIBS})
+if ("${CMAKE_SYSTEM_NAME}" STREQUAL Windows)
+ target_link_libraries(armnn Ws2_32.lib)
+endif()
install(TARGETS armnn
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
@@ -963,8 +968,10 @@
include_directories(${Boost_INCLUDE_DIRS} tests/profiling/timelineDecoder)
add_library_ex(gatordMockService STATIC ${gatord_mock_sources})
+ target_include_directories(gatordMockService PRIVATE src/armnnUtils)
add_executable_ex(GatordMock tests/profiling/gatordmock/GatordMockMain.cpp)
+ target_include_directories(GatordMock PRIVATE src/armnnUtils)
target_link_libraries(GatordMock
armnn