• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14cmake_minimum_required(VERSION 3.14)
15
16project(TaiheRuntime C CXX)
17
18option(ENABLE_RT_TEST "Enable my feature" OFF)
19
20set(CMAKE_CXX_STANDARD 17)
21set(CMAKE_CXX_STANDARD_REQUIRED ON)
22set(CMAKE_C_STANDARD 99)
23set(CMAKE_C_STANDARD_REQUIRED ON)
24
25set(CMAKE_C_VISIBILITY_PRESET "hidden")
26set(CMAKE_CXX_VISIBILITY_PRESET "hidden")
27
28# Handy for development use.
29set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
30
31
32set(TH_SOURCE src/string.cpp
33              src/object.cpp
34              src/runtime.cpp)
35
36add_library(taihe_runtime STATIC ${TH_SOURCE})
37
38set_target_properties(taihe_runtime PROPERTIES
39    ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
40)
41
42target_include_directories(taihe_runtime PUBLIC
43    include
44    ../compiler/.panda_vm/package/ohos_arm64/include/plugins/ets/runtime/ani)
45
46target_compile_options(taihe_runtime PRIVATE -fPIC)
47