• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 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.10)
15
16project(ark)
17
18set(SOURCES
19    panda.cpp
20)
21
22panda_add_executable(ark ${SOURCES})
23
24panda_add_to_clang_tidy(TARGET ark CHECKS
25    "-cppcoreguidelines-macro-usage"
26    "-cppcoreguidelines-non-private-member-variables-in-classes"
27    "-cppcoreguidelines-pro-bounds-pointer-arithmetic"
28    "-google-explicit-constructor"
29    "-hicpp-explicit-conversions"
30    "-misc-non-private-member-variables-in-classes"
31    "-readability-identifier-naming"
32    "-readability-named-parameter"
33)
34
35target_link_libraries(ark arkruntime arkbase)
36
37target_include_directories(ark
38    PUBLIC ../runtime
39    PUBLIC ${CMAKE_BINARY_DIR}/libpandabase
40)
41
42target_link_libraries(ark arkruntime arkbase)
43
44panda_add_sanitizers(TARGET ark SANITIZERS ${PANDA_SANITIZERS_LIST})
45
46# TODO: remove after all components will use ark instead of panda
47add_custom_target(panda ALL
48                  COMMAND cd $<TARGET_FILE_DIR:ark> && ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:ark> panda)
49
50add_dependencies(panda ark)
51
52add_check_style(".")
53