CMakeLists.txt 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Copyright (C) 2024 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-exception-handling)
  5. add_definitions (-DRUN_ON_LINUX)
  6. add_definitions (-Dattr_container_malloc=malloc)
  7. add_definitions (-Dattr_container_free=free)
  8. set (WAMR_BUILD_AOT 0)
  9. set (WAMR_BUILD_INTERP 1)
  10. set (WAMR_BUILD_FAST_INTERP 0)
  11. set (WAMR_BUILD_JIT 0)
  12. set (WAMR_BUILD_LIBC_WASI 0)
  13. set (WAMR_BUILD_APP_FRAMEWORK 0)
  14. set (WAMR_BUILD_EXCE_HANDLING 1)
  15. include (../unit_common.cmake)
  16. include_directories (${CMAKE_CURRENT_SOURCE_DIR})
  17. include_directories (${IWASM_DIR}/interpreter)
  18. file (GLOB_RECURSE source_all ${CMAKE_CURRENT_SOURCE_DIR}/*.cc)
  19. set (UNIT_SOURCE ${source_all})
  20. set (unit_test_sources
  21. ${UNIT_SOURCE}
  22. ${WAMR_RUNTIME_LIB_SOURCE}
  23. )
  24. # Now simply link against gtest or gtest_main as needed. Eg
  25. add_executable (exception_handling_test ${unit_test_sources})
  26. target_link_libraries (exception_handling_test gtest_main)
  27. gtest_discover_tests(exception_handling_test)