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 14set(functions_tests 15 name 16) 17 18set(functions_tests_in_dir "${CMAKE_CURRENT_SOURCE_DIR}") 19set(functions_tests_out_dir "${CMAKE_CURRENT_BINARY_DIR}") 20 21add_custom_target(ets_test_suite_functions) 22 23foreach(test ${functions_tests}) 24 set(test_out_dir "${functions_tests_out_dir}/${test}") 25 26 set(test_in "${functions_tests_in_dir}/${test}.ets") 27 set(target ets_test_suite_functions_${test}) 28 29 run_int_jit_aot_ets_code(${test_in} ${test_out_dir} ${target}) 30 add_dependencies(ets_test_suite_functions 31 ${target}-ets-jit 32 ${target}-ets-int) 33 if (NOT CMAKE_CROSSCOMPILING) 34 add_dependencies(ets_test_suite_functions ${target}-ets-aot) 35 endif() 36endforeach() 37