• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This file is part of the openHiTLS project.
2#
3# openHiTLS is licensed under the Mulan PSL v2.
4# You can use this software according to the terms and conditions of the Mulan PSL v2.
5# You may obtain a copy of Mulan PSL v2 at:
6#
7#     http://license.coscl.org.cn/MulanPSL2
8#
9# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
10# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
11# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
12# See the Mulan PSL v2 for more details.
13cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
14
15project(GEN_TEST)
16
17set(GEN_TESTCASE "gen_testcase")
18set(HITLS_SRC ${PROJECT_SOURCE_DIR}/../../..)
19set(EXECUTABLE_OUTPUT_PATH ${HITLS_SRC}/testcode/output)
20set(SECURTE_INCLUDE ${HITLS_SRC}/platform/Secure_C/include)
21set(GEN_SOURCE_SRC
22    ${PROJECT_SOURCE_DIR}/main.c
23    ${PROJECT_SOURCE_DIR}/helper.c
24    ${PROJECT_SOURCE_DIR}/test.c
25)
26
27include_directories(${SECURTE_INCLUDE}
28    ${HITLS_SRC}/testcode/framework/include
29    ${HITLS_SRC}/testcode/framework/crypto
30    ${HITLS_SRC}/config/macro_config
31    ${HITLS_SRC}/crypto/include
32    ${HITLS_SRC}/include/crypto
33    ${HITLS_SRC}/include/bsl
34    ${HITLS_SRC}/bsl/err/include
35)
36
37add_executable(${GEN_TESTCASE} ${GEN_SOURCE_SRC})
38
39if(PRINT_TO_TERMINAL)
40    target_compile_options(${GEN_TESTCASE} PRIVATE -DPRINT_TO_TERMINAL)
41endif()
42
43target_link_directories(${GEN_TESTCASE}
44    PRIVATE
45        ${HITLS_SRC}/platform/Secure_C/lib
46)
47target_link_libraries(${GEN_TESTCASE}
48    boundscheck
49)
50