summaryrefslogtreecommitdiffstats
path: root/src/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/product-mini/platforms/riot/CMakeLists.txt
blob: 00328326274c0d9023d4f1b16c74b7f653e7155d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright (C) 2019 Intel Corporation.  All rights reserved.
# Copyright (C) 2020 TU Bergakademie Freiberg Karl Fessel
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

cmake_minimum_required(VERSION 3.8.2)

set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")

project(NONE)

enable_language (ASM)

set (WAMR_BUILD_PLATFORM "riot")

# Build as X86_32 by default, change to "AARCH64[sub]", "ARM[sub]", "THUMB[sub]", "MIPS" or "XTENSA"
# if we want to support arm, thumb, mips or xtensa


if (NOT DEFINED WAMR_BUILD_TARGET)
  set (WAMR_BUILD_TARGET "X86_32")
endif ()

if (NOT DEFINED WAMR_BUILD_INTERP)
  # Enable Interpreter by default
  set (WAMR_BUILD_INTERP 1)
endif ()

if (NOT DEFINED WAMR_BUILD_AOT)
  # Disable AOT by default.
  set (WAMR_BUILD_AOT 0)
endif ()

if (NOT DEFINED WAMR_BUILD_LIBC_BUILTIN)
  # Enable libc builtin support by default
  set (WAMR_BUILD_LIBC_BUILTIN 1)
endif ()

if (NOT DEFINED WAMR_BUILD_LIBC_WASI)
  # Disable libc wasi support by default
  set (WAMR_BUILD_LIBC_WASI 0)
endif ()

if (NOT DEFINED WAMR_ROOT_DIR)
  # this assumption is true if this file is copied to WAMR_ROOT
  set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
endif ()

# Override the global heap size for small devices
if (NOT DEFINED  WAMR_BUILD_GLOBAL_HEAP_SIZE)
  add_definitions (-DWASM_GLOBAL_HEAP_SIZE=262144) # 256 kB
endif ()


include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)

# need includes from RIOT prepare them as a cmake list
string(REGEX MATCHALL "([^\ ]+\ |[^\ ]+$)" RIOT_INCLUDES_LIST "${RIOT_INCLUDES}")

include_directories(SYSTEM ${RIOT_INCLUDES_LIST})

# target_sources( ${WAMR_RUNTIME_LIB_SOURCE} )
# executable linking is done by RIOT build system

add_library( wamr ${WAMR_RUNTIME_LIB_SOURCE})