aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorColm Donelan <Colm.Donelan@arm.com>2019-10-11 13:09:49 +0100
committerColm Donelan <Colm.Donelan@arm.com>2019-10-11 13:12:37 +0100
commita21620d32a8a0a8d527c061e2a22d51009d75877 (patch)
treeb08ffee4cddb1bb3b1d206c67ea80bc2093d7bf5 /CMakeLists.txt
parent67ef2a52c3cdcc37538d77711bbcea2f0e5655e5 (diff)
downloadarmnn-a21620d32a8a0a8d527c061e2a22d51009d75877.tar.gz
IVGCVSW-3721 Add support for startup sequence (Mock Gatord service).
* Receive and process the stream metadata from the client. * Send the connection ack packet. * Wait in a receiving thread and print the packets. * GatordMockTest and Impl for PeriodicCounterCapture CommandHandler * CaptureData class to retain packet data * MockUtils * Update SocketProfilingConnection to fix non blocking receipt of packets. * Restructure directory layout following review comments. * Extract the mock service into a static library in the cmake files. Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Signed-off-by: Keith Davis <keith.davis@arm.com> Signed-off-by: Mike Kelly <mike.kelly@arm.com> Signed-off-by: Finn Williams <Finn.Williams@arm.com> Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I33c1c9f93976708c9315f71290d42cff53b8c075
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt39
1 files changed, 30 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3e415d09b5..0430643494 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -782,6 +782,12 @@ if(BUILD_UNIT_TESTS)
set_source_files_properties(src/armnnDeserializer/test/SchemaSerialize.s PROPERTIES COMPILE_FLAGS "-x assembler-with-cpp")
endif()
+ if(BUILD_GATORD_MOCK)
+ list(APPEND unittest_sources
+ tests/profiling/gatordmock/tests/GatordMockTests.cpp
+ )
+ endif()
+
foreach(lib ${armnnUnitTestLibraries})
message("Adding object library dependency to UnitTests: ${lib}")
list(APPEND unittest_sources $<TARGET_OBJECTS:${lib}>)
@@ -812,6 +818,10 @@ if(BUILD_UNIT_TESTS)
target_link_libraries(UnitTests armnnTfParser)
endif()
+ if(BUILD_GATORD_MOCK)
+ target_link_libraries(UnitTests gatordMockService)
+ endif()
+
if(BUILD_TF_LITE_PARSER)
target_include_directories(UnitTests SYSTEM PRIVATE "${TF_LITE_SCHEMA_INCLUDE_PATH}")
target_include_directories(UnitTests SYSTEM PRIVATE "${FLATBUFFERS_INCLUDE_PATH}")
@@ -879,19 +889,30 @@ endif()
if(BUILD_GATORD_MOCK)
set(gatord_mock_sources)
list(APPEND gatord_mock_sources
- tests/profiling/GatordMockMain.cpp
- tests/profiling/CommandLineProcessor.hpp
- tests/profiling/CommandLineProcessor.cpp
- tests/profiling/GatordMockService.hpp
- tests/profiling/GatordMockService.cpp
+ tests/profiling/gatordmock/CommandFileParser.hpp
+ tests/profiling/gatordmock/CommandFileParser.cpp
+ tests/profiling/gatordmock/CommandLineProcessor.hpp
+ tests/profiling/gatordmock/CommandLineProcessor.cpp
+ tests/profiling/gatordmock/GatordMockService.hpp
+ tests/profiling/gatordmock/GatordMockService.cpp
+ tests/profiling/gatordmock/MockUtils.hpp
+ tests/profiling/gatordmock/PeriodicCounterCaptureCommandHandler.cpp
+ tests/profiling/gatordmock/PeriodicCounterCaptureCommandHandler.hpp
)
- include_directories( ${Boost_INCLUDE_DIRS} )
+ include_directories( ${Boost_INCLUDE_DIRS} src/profiling)
- add_executable_ex(GartordMock ${gatord_mock_sources})
+ add_library_ex(gatordMockService STATIC ${gatord_mock_sources})
+ add_executable_ex(GartordMock tests/profiling/gatordmock/GatordMockMain.cpp)
+
+ if(Threads_FOUND AND (NOT ("${CMAKE_SYSTEM_NAME}" STREQUAL Android)))
+ target_link_libraries(GartordMock pthread)
+ endif()
+
+ target_link_libraries(GartordMock armnn gatordMockService)
target_link_libraries(GartordMock
- ${Boost_PROGRAM_OPTIONS_LIBRARY}
+ ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_SYSTEM_LIBRARY}
)
-endif()
+endif() \ No newline at end of file