• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#    http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16#
17# This component was generated for the '%{EXECUTABLE}%' TF Micro example.
18#
19
20# Make sure that the IDF Path environment variable is defined
21if(NOT DEFINED ENV{IDF_PATH})
22  message(FATAL_ERROR "The IDF_PATH environment variable must point to the location of the ESP-IDF.")
23endif()
24
25idf_component_register(
26  SRCS %{COMPONENT_SRCS}%
27  INCLUDE_DIRS %{COMPONENT_INCLUDES}%)
28
29# Reduce the level of paranoia to be able to compile TF sources
30target_compile_options(${COMPONENT_LIB} PRIVATE
31  -Wno-maybe-uninitialized
32  -Wno-missing-field-initializers
33  -Wno-pointer-sign
34  -Wno-type-limits)
35
36set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} %{CC_FLAGS}%")
37set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} %{CXX_FLAGS}%")
38set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} %{LINKER_FLAGS}%")
39