simde.cmake 941 B

12345678910111213141516171819202122232425262728
  1. # Copyright (C) 2024 Amazon Inc. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. # simde is a header only library
  4. # Yes. To solve the compatibility issue with CMAKE (>= 4.0), we need to update
  5. # our `cmake_minimum_required()` to 3.5. However, there are CMakeLists.txt
  6. # from 3rd parties that we should not alter. Therefore, in addition to
  7. # changing the `cmake_minimum_required()`, we should also add a configuration
  8. # here that is compatible with earlier versions.
  9. set(CMAKE_POLICY_VERSION_MINIMUM 3.5 FORCE)
  10. set (LIB_SIMDE_DIR ${CMAKE_CURRENT_LIST_DIR})
  11. add_definitions (-DWASM_ENABLE_SIMDE=1)
  12. include_directories(${LIB_SIMDE_DIR} ${LIB_SIMDE_DIR}/simde)
  13. include(FetchContent)
  14. FetchContent_Declare(
  15. simde
  16. GIT_REPOSITORY https://github.com/simd-everywhere/simde
  17. GIT_TAG v0.8.2
  18. )
  19. message("-- Fetching simde ..")
  20. FetchContent_MakeAvailable(simde)
  21. include_directories("${simde_SOURCE_DIR}")