• 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
14set(SOURCES
15    test_util.cpp
16    test_extractor.cpp)
17
18# Test library can't be built with --no-undefined option
19set(UNSUPPORTED_LINKER_FLAGS "-Wl,--no-undefined")
20if (CMAKE_SHARED_LINKER_FLAGS)
21    string(REPLACE ${UNSUPPORTED_LINKER_FLAGS} "" CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})
22endif()
23
24# Common testing framework for tooling tests
25add_library(debugtest SHARED ${SOURCES})
26target_link_libraries(debugtest arkfile arkruntime)
27
28target_include_directories(debugtest PUBLIC
29    ${PANDA_ROOT}
30    ${CMAKE_CURRENT_SOURCE_DIR}
31)
32
33panda_add_to_clang_tidy(debugtest)
34panda_add_sanitizers(TARGET debugtest SANITIZERS ${PANDA_SANITIZERS_LIST})
35