diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 39 |
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 |