CMakeLists.txt 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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(unit-test)
  5. # Yes. To solve the compatibility issue with CMAKE (>= 4.0), we need to update
  6. # our `cmake_minimum_required()` to 3.5. However, there are CMakeLists.txt
  7. # from 3rd parties that we should not alter. Therefore, in addition to
  8. # changing the `cmake_minimum_required()`, we should also add a configuration
  9. # here that is compatible with earlier versions.
  10. set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
  11. SET(CMAKE_BUILD_TYPE Debug)
  12. # add_definitions (-m32)
  13. set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
  14. set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
  15. if(WAMR_BUILD_TARGET STREQUAL "X86_32")
  16. set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
  17. set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
  18. endif()
  19. # Prevent overriding the parent project's compiler/linker
  20. # settings on Windows
  21. set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
  22. # Fetch Google test
  23. include (FetchContent)
  24. FetchContent_Declare (
  25. googletest
  26. URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
  27. )
  28. FetchContent_MakeAvailable (googletest)
  29. SET(GOOGLETEST_INCLUDED 1)
  30. include(GoogleTest)
  31. enable_testing()
  32. add_subdirectory(wasm-vm)
  33. add_subdirectory(interpreter)
  34. add_subdirectory(aot)
  35. add_subdirectory(wasm-c-api)
  36. add_subdirectory(libc-builtin)
  37. add_subdirectory(shared-utils)
  38. add_subdirectory(running-modes)
  39. add_subdirectory(runtime-common)
  40. add_subdirectory(custom-section)
  41. add_subdirectory(compilation)
  42. add_subdirectory(linear-memory-wasm)
  43. add_subdirectory(linear-memory-aot)
  44. add_subdirectory(aot-stack-frame)
  45. add_subdirectory(linux-perf)
  46. add_subdirectory(gc)
  47. add_subdirectory(memory64)
  48. add_subdirectory(tid-allocator)
  49. add_subdirectory(shared-heap)