CMakeLists.txt 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. cmake_minimum_required(VERSION 3.14)
  4. project (test-linux-perf)
  5. add_definitions (-DRUN_ON_LINUX)
  6. set (WAMR_BUILD_LIBC_WASI 0)
  7. set (WAMR_BUILD_LIBC_BUILTIN 0)
  8. set (WAMR_BUILD_JIT 0)
  9. set (WAMR_BUILD_AOT 1)
  10. set (WAMR_BUILD_FAST_INTERP 0)
  11. set (WAMR_BUILD_INTERP 1)
  12. set (WAMR_BUILD_MULTI_MODULE 0)
  13. set (WAMR_BUILD_LINUX_PERF 1)
  14. add_definitions(-DWASM_ENABLE_WAMR_COMPILER=1)
  15. # Feature to test
  16. set (WAMR_BUILD_DUMP_CALL_STACK 1)
  17. include (../unit_common.cmake)
  18. find_package(LLVM REQUIRED CONFIG)
  19. include_directories(${LLVM_INCLUDE_DIRS})
  20. add_definitions(${LLVM_DEFINITIONS})
  21. include (${IWASM_DIR}/compilation/iwasm_compl.cmake)
  22. add_executable (linux_perf_test test_sort_func_ptrs.cc)
  23. target_compile_options(linux_perf_test PUBLIC -fpermissive)
  24. target_link_libraries(linux_perf_test ${LLVM_AVAILABLE_LIBS} gtest_main )
  25. target_link_options(linux_perf_test
  26. PUBLIC
  27. LINKER:--unresolved-symbols=ignore-all
  28. )
  29. gtest_discover_tests(linux_perf_test)