David Beck | 10b4dfd | 2018-09-19 12:03:20 +0100 | [diff] [blame] | 1 | # |
| 2 | # Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | # SPDX-License-Identifier: MIT |
| 4 | # |
| 5 | |
| 6 | add_subdirectory(${PROJECT_SOURCE_DIR}/src/backends) |
| 7 | list(APPEND armnnLibraries armnnBackendsCommon) |
Aron Virginas-Tar | 29fe58b | 2018-10-26 15:37:23 +0100 | [diff] [blame] | 8 | list(APPEND armnnUnitTestLibraries armnnBackendsCommonUnitTests) |
David Beck | 10b4dfd | 2018-09-19 12:03:20 +0100 | [diff] [blame] | 9 | |
| 10 | # single place to use wildcards, so we can include |
David Beck | 711fa31 | 2018-09-24 10:46:38 +0100 | [diff] [blame] | 11 | # yet unknown backend modules and corresponding common libraries |
| 12 | FILE(GLOB commonIncludes ${PROJECT_SOURCE_DIR}/src/backends/*/common.cmake) |
David Beck | 10b4dfd | 2018-09-19 12:03:20 +0100 | [diff] [blame] | 13 | FILE(GLOB backendIncludes ${PROJECT_SOURCE_DIR}/src/backends/*/backend.cmake) |
| 14 | |
David Beck | 3cc9a62 | 2018-10-12 10:38:31 +0100 | [diff] [blame] | 15 | # prefer to include common code first |
| 16 | foreach(includeFile ${commonIncludes}) |
| 17 | message("Including backend common library into the build: ${includeFile}") |
| 18 | include(${includeFile}) |
| 19 | endforeach() |
| 20 | |
| 21 | # now backends can depend on common code included first |
| 22 | foreach(includeFile ${backendIncludes}) |
David Beck | 0dbe0ee | 2018-09-24 15:59:27 +0100 | [diff] [blame] | 23 | message("Including backend into the build: ${includeFile}") |
| 24 | include(${includeFile}) |
David Beck | 10b4dfd | 2018-09-19 12:03:20 +0100 | [diff] [blame] | 25 | endforeach() |