Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1 | # Copyright (c) 2017 ARM Limited. |
| 2 | # |
| 3 | # SPDX-License-Identifier: MIT |
| 4 | # |
| 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy |
| 6 | # of this software and associated documentation files (the "Software"), to |
| 7 | # deal in the Software without restriction, including without limitation the |
| 8 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 9 | # sell copies of the Software, and to permit persons to whom the Software is |
| 10 | # furnished to do so, subject to the following conditions: |
| 11 | # |
| 12 | # The above copyright notice and this permission notice shall be included in all |
| 13 | # copies or substantial portions of the Software. |
| 14 | # |
| 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 21 | # SOFTWARE. |
| 22 | cmake_minimum_required (VERSION 3.1) |
| 23 | project (arm_compute_test) |
| 24 | |
| 25 | set(CMAKE_CXX_STANDARD 11) |
| 26 | set(CMAKE_CXX_STANDARD_REQUIRED ON) |
| 27 | |
| 28 | add_library(boost_unit_test_framework STATIC IMPORTED) |
| 29 | set_target_properties(boost_unit_test_framework PROPERTIES |
| 30 | IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/../3rdparty/linux/armv7a/libboost_unit_test_framework.a" |
| 31 | ) |
| 32 | |
| 33 | add_library(boost_program_options STATIC IMPORTED) |
| 34 | set_target_properties(boost_program_options PROPERTIES |
| 35 | IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/../3rdparty/linux/armv7a/libboost_program_options.a" |
| 36 | ) |
| 37 | |
| 38 | add_library(arm_compute SHARED IMPORTED) |
| 39 | set_target_properties(arm_compute PROPERTIES |
| 40 | IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/../build/libarm_compute.so" |
| 41 | ) |
| 42 | |
| 43 | include_directories("${CMAKE_SOURCE_DIR}") |
| 44 | include_directories("${CMAKE_SOURCE_DIR}/..") |
| 45 | include_directories("${CMAKE_SOURCE_DIR}/../3rdparty/include/") |
| 46 | |
| 47 | # TensorLibrary |
| 48 | set(tensor_library_SOURCE_FILES |
| 49 | ${CMAKE_SOURCE_DIR}/RawTensor.h |
| 50 | ${CMAKE_SOURCE_DIR}/RawTensor.cpp |
| 51 | ${CMAKE_SOURCE_DIR}/TensorCache.h |
| 52 | ${CMAKE_SOURCE_DIR}/TensorLibrary.h |
| 53 | ${CMAKE_SOURCE_DIR}/TensorLibrary.cpp |
| 54 | ) |
| 55 | |
| 56 | add_library(tensor_library OBJECT |
| 57 | ${tensor_library_SOURCE_FILES} |
| 58 | ) |
| 59 | |
| 60 | set(arm_compute_test_SOURCE_FILES |
| 61 | ${CMAKE_SOURCE_DIR}/BorderModeDataset.h |
| 62 | ${CMAKE_SOURCE_DIR}/ConvertPolicyDataset.h |
| 63 | ${CMAKE_SOURCE_DIR}/Globals.h |
| 64 | ${CMAKE_SOURCE_DIR}/IAccessor.h |
| 65 | ${CMAKE_SOURCE_DIR}/ImageDatasets.h |
| 66 | ${CMAKE_SOURCE_DIR}/InterpolationPolicyDataset.h |
| 67 | ${CMAKE_SOURCE_DIR}/NormalizationTypeDataset.h |
| 68 | ${CMAKE_SOURCE_DIR}/ProgramOptions.h |
| 69 | ${CMAKE_SOURCE_DIR}/ProgramOptions.cpp |
| 70 | ${CMAKE_SOURCE_DIR}/RoundingPolicyDataset.h |
| 71 | ${CMAKE_SOURCE_DIR}/ShapeDatasets.h |
| 72 | ${CMAKE_SOURCE_DIR}/TypePrinter.h |
| 73 | ${CMAKE_SOURCE_DIR}/TypeReader.h |
| 74 | ${CMAKE_SOURCE_DIR}/UserConfiguration.h |
| 75 | ${CMAKE_SOURCE_DIR}/UserConfiguration.cpp |
| 76 | ${CMAKE_SOURCE_DIR}/Utils.h |
| 77 | ${CMAKE_SOURCE_DIR}/boost_wrapper.h |
| 78 | ) |
| 79 | |
| 80 | add_library(arm_compute_test OBJECT |
| 81 | ${arm_compute_test_SOURCE_FILES} |
| 82 | ) |
| 83 | |
| 84 | add_subdirectory(validation) |
| 85 | add_subdirectory(benchmark) |