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) |
| 8 | |
| 9 | # single place to use wildcards, so we can include |
David Beck | 711fa31 | 2018-09-24 10:46:38 +0100 | [diff] [blame] | 10 | # yet unknown backend modules and corresponding common libraries |
| 11 | FILE(GLOB commonIncludes ${PROJECT_SOURCE_DIR}/src/backends/*/common.cmake) |
David Beck | 10b4dfd | 2018-09-19 12:03:20 +0100 | [diff] [blame] | 12 | FILE(GLOB backendIncludes ${PROJECT_SOURCE_DIR}/src/backends/*/backend.cmake) |
| 13 | |
David Beck | 3cc9a62 | 2018-10-12 10:38:31 +0100 | [diff] [blame] | 14 | # prefer to include common code first |
| 15 | foreach(includeFile ${commonIncludes}) |
| 16 | message("Including backend common library into the build: ${includeFile}") |
| 17 | include(${includeFile}) |
| 18 | endforeach() |
| 19 | |
| 20 | # now backends can depend on common code included first |
| 21 | foreach(includeFile ${backendIncludes}) |
David Beck | 0dbe0ee | 2018-09-24 15:59:27 +0100 | [diff] [blame] | 22 | message("Including backend into the build: ${includeFile}") |
| 23 | include(${includeFile}) |
David Beck | 10b4dfd | 2018-09-19 12:03:20 +0100 | [diff] [blame] | 24 | endforeach() |