Sadik Armagan | a097d2a | 2021-11-24 15:47:28 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright © 2021 Arm Ltd and Contributors. All rights reserved. |
| 3 | # SPDX-License-Identifier: MIT |
| 4 | # |
| 5 | |
| 6 | # armnnTestUtils library provides useful test functions for backend developers. |
| 7 | set(armnnTestUtils_sources) |
| 8 | list(APPEND armnnTestUtils_sources |
| 9 | ../../include/armnnTestUtils/DataLayoutUtils.hpp |
| 10 | ../../include/armnnTestUtils/LayerTestResult.hpp |
Colm Donelan | 17948b5 | 2022-02-01 23:37:04 +0000 | [diff] [blame] | 11 | ../../include/armnnTestUtils/MockBackend.hpp |
| 12 | ../../include/armnnTestUtils/MockMemoryManager.hpp |
| 13 | ../../include/armnnTestUtils/MockTensorHandle.hpp |
Sadik Armagan | a097d2a | 2021-11-24 15:47:28 +0000 | [diff] [blame] | 14 | ../../include/armnnTestUtils/PredicateResult.hpp |
| 15 | ../../include/armnnTestUtils/TensorCopyUtils.hpp |
Colm Donelan | 0c47974 | 2021-12-10 12:43:54 +0000 | [diff] [blame] | 16 | ../../include/armnnTestUtils/WorkloadTestUtils.hpp |
Colm Donelan | c42a987 | 2022-02-02 16:35:09 +0000 | [diff] [blame] | 17 | ../../include/armnnTestUtils/TensorHelpers.hpp |
Sadik Armagan | a097d2a | 2021-11-24 15:47:28 +0000 | [diff] [blame] | 18 | CreateWorkload.hpp |
| 19 | CommonTestUtils.cpp |
| 20 | CommonTestUtils.hpp |
| 21 | DataTypeUtils.hpp |
| 22 | GraphUtils.cpp |
| 23 | GraphUtils.hpp |
Colm Donelan | 17948b5 | 2022-02-01 23:37:04 +0000 | [diff] [blame] | 24 | MockBackend.cpp |
| 25 | MockMemoryManager.cpp |
| 26 | MockTensorHandle.cpp |
Colm Donelan | 17948b5 | 2022-02-01 23:37:04 +0000 | [diff] [blame] | 27 | MockTensorHandleFactory.cpp |
Sadik Armagan | a097d2a | 2021-11-24 15:47:28 +0000 | [diff] [blame] | 28 | TensorCopyUtils.cpp |
| 29 | TestUtils.cpp |
| 30 | TestUtils.hpp |
| 31 | UnitTests.cpp |
| 32 | UnitTests.hpp |
Sadik Armagan | a097d2a | 2021-11-24 15:47:28 +0000 | [diff] [blame] | 33 | ) |
| 34 | |
| 35 | add_library_ex(armnnTestUtils SHARED ${armnnTestUtils_sources}) |
| 36 | |
| 37 | set_target_properties(armnnTestUtils PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) |
| 38 | |
| 39 | target_include_directories(armnnTestUtils |
| 40 | PUBLIC |
| 41 | $<INSTALL_INTERFACE:include> |
| 42 | $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 43 | PRIVATE |
| 44 | ${CMAKE_CURRENT_SOURCE_DIR}/src) |
| 45 | |
| 46 | target_include_directories(armnnTestUtils PRIVATE ../armnn) |
| 47 | target_include_directories(armnnTestUtils PRIVATE ../armnnUtils) |
| 48 | target_include_directories(armnnTestUtils PRIVATE ../backends) |
| 49 | target_include_directories(armnnTestUtils PRIVATE ../profiling) |
| 50 | |
Rob Hughes | fcd598d | 2021-12-21 16:41:09 +0000 | [diff] [blame] | 51 | target_link_libraries(armnnTestUtils armnn) |
| 52 | |
Sadik Armagan | a097d2a | 2021-11-24 15:47:28 +0000 | [diff] [blame] | 53 | install(TARGETS armnnTestUtils |
| 54 | EXPORT armnn-targets |
| 55 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 56 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 57 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) |
| 58 | |
Matthew Bentham | 79bb653 | 2022-02-11 08:29:42 +0000 | [diff] [blame] | 59 | add_library(Armnn::armnnTestUtils ALIAS armnnTestUtils) |