wasm-micro-runtime/samples/workload/wasm-av1/CMakeLists.avx_wasm.txt
Wenyong Huang 27e7e160af
Upgrade toolkits (#1878)
Upgrade the version of related toolkits:
- upgrade llvm to 15.0
- upgrade wasi-sdk to 19.0
- upgrade emsdk to 3.1.28
- upgrade wabt to 1.0.31
- upgrade binaryen to 111

And upgrade the CI scripts, sample workload build scripts, Dockerfiles, and documents.
2023-02-02 09:42:25 +08:00

73 lines
2.0 KiB
Plaintext

# Copyright (C) 2019 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
cmake_minimum_required (VERSION 3.14)
project(testavx)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake)
################ dependencies ################
find_package(Binaryen 111 REQUIRED)
################ AOM ################
set(ENABLE_CCACHE ON)
set(ENABLE_DOCS OFF CACHE BOOL "ENABLE_DOCS" FORCE)
set(ENABLE_EXAMPLES OFF CACHE BOOL "ENABLE_EXAMPLES" FORCE)
set(ENABLE_NEON OFF CACHE BOOL "ENABLE_EXAMPLES" FORCE)
set(ENABLE_NEON_ASM OFF CACHE BOOL "ENABLE_EXAMPLES" FORCE)
set(ENABLE_VSX OFF CACHE BOOL "ENABLE_EXAMPLES" FORCE)
set(ENABLE_MMX OFF CACHE BOOL "ENABLE_EXAMPLES" FORCE)
set(AOM_TARGET_CPU generic)
set(CONFIG_ACCOUNTING 1 CACHE NUMBER "" FORCE)
set(CONFIG_INSPECTION 1 CACHE NUMBER "" FORCE)
set(CONFIG_MULTITHREAD 0 CACHE NUMBER "" FORCE)
set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE NUMBER "" FORCE)
set(CONFIG_UNIT_TESTS 0 CACHE NUMBER "" FORCE)
set(CONFIG_WEBM_IO 0 CACHE NUMBER "" FORCE)
add_subdirectory(third_party/aom third_party/aom/bin EXCLUDE_FROM_ALL)
################ AV ################
add_executable(${PROJECT_NAME}
test.c
decode-av1.c
)
target_include_directories(${PROJECT_NAME}
PRIVATE
third_party/aom/
${CMAKE_CURRENT_BINARY_DIR}/third_party/aom/bin
)
set_target_properties(${PROJECT_NAME}
PROPERTIES
OUTPUT_NAME ${PROJECT_NAME}.wasm
)
target_link_options(${PROJECT_NAME}
PRIVATE
LINKER:--allow-undefined
LINKER:--export=__heap_base
LINKER:--export=__data_end
LINKER:--initial-memory=33554432
LINKER:-z,stack-size=25165824
)
target_link_libraries(${PROJECT_NAME}
PRIVATE
aom
)
add_dependencies(${PROJECT_NAME} aom)
add_custom_target(${PROJECT_NAME}_opt ALL
COMMAND
${Binaryen_WASM_OPT} -Oz --enable-simd -o ${PROJECT_NAME}.opt.wasm ${PROJECT_NAME}.wasm
BYPRODUCTS
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.opt.wasm
WORKING_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}
)
add_dependencies(${PROJECT_NAME}_opt ${PROJECT_NAME})