blob: 0ba8afb1e1e3099ad5049311906f832a628fc999 [file] [log] [blame]
cmake_minimum_required (VERSION 3.4)
# Copyright (c) 2020, ARM Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
project(tosa_reference_model LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
set(CMAKE_CXX_FLAGS "-Wall -Wno-ignored-attributes -Wno-format-truncation")
else()
set(CMAKE_CXX_FLAGS "-Wall -Wno-ignored-attributes")
endif()
set(FLATBUFFERS_DIR "../thirdparty/flatbuffers/")
set(SERIALIZATION_DIR "../serialization")
set (CXX_SOURCE
src/main.cpp
src/tensor.cc
src/graph_node.cc
src/subgraph_traverser.cc
src/func_debug.cc
src/func_config.cc
src/ops/op_factory.cc
src/ops/tensor_ops.cc
src/ops/activation_funcs.cc
src/ops/ewise_binary.cc
src/ops/ewise_unary.cc
src/ops/ewise_ternary.cc
src/ops/comparison.cc
src/ops/reduction.cc
src/ops/data_layout.cc
src/ops/scatter_gather.cc
src/ops/image.cc
src/ops/type_conversion.cc
src/ops/data_nodes.cc
src/ops/custom.cc
src/ops/control_flow.cc
)
add_executable(tosa_reference_model ${CXX_SOURCE})
target_include_directories(tosa_reference_model
PUBLIC
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SRC_DIR}/include>
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
${FLATBUFFERS_DIR}/include
../thirdparty/eigen/
../thirdparty/eigen/unsupported/
${SERIALIZATION_DIR}
)
target_link_libraries(tosa_reference_model
PRIVATE
flatbuffers
tosa_serialization
)
install (TARGETS tosa_reference_model DESTINATION bin)