1# Copyright (c) Meta Platforms, Inc. and affiliates. 2# All rights reserved. 3# 4# This source code is licensed under the BSD-style license found in the 5# LICENSE file in the root directory of this source tree. 6 7# This file should be formatted with 8# ~~~ 9# cmake-format -i CMakeLists.txt 10# ~~~ 11# It should also be cmake-lint clean. 12# 13# This file builds portable-specific tests 14 15cmake_minimum_required(VERSION 3.19) 16project(kernels_portable_test) 17 18# Use C++17 for test. 19set(CMAKE_CXX_STANDARD 17) 20 21set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../..) 22 23include(${EXECUTORCH_ROOT}/build/Test.cmake) 24 25set(_kernels_portable_test_sources 26 # So far we can't generate custom_ops.yaml in OSS so we can't build op 27 # library with op_allclose. We disable the test for now. 28 # "op_allclose_test.cpp" 29 "op_div_test.cpp" "op_gelu_test.cpp" "op_mul_test.cpp" 30) 31 32et_cxx_test( 33 kernels_portable_test SOURCES ${_kernels_portable_test_sources} EXTRA_LIBS 34 portable_kernels portable_ops_lib 35) 36target_include_directories( 37 kernels_portable_test PRIVATE "${CMAKE_INSTALL_PREFIX}/include" 38) 39