Boost.cmake 991 B

12345678910111213141516171819202122232425
  1. set(_context_abi_line "")
  2. set(_context_arch_line "")
  3. if (APPLE AND CMAKE_OSX_ARCHITECTURES)
  4. if (CMAKE_OSX_ARCHITECTURES MATCHES "x86")
  5. set(_context_abi_line "-DBOOST_CONTEXT_ABI:STRING=sysv")
  6. elseif (CMAKE_OSX_ARCHITECTURES MATCHES "arm")
  7. set (_context_abi_line "-DBOOST_CONTEXT_ABI:STRING=aapcs")
  8. endif ()
  9. set(_context_arch_line "-DBOOST_CONTEXT_ARCHITECTURE:STRING=${CMAKE_OSX_ARCHITECTURES}")
  10. endif ()
  11. add_cmake_project(Boost
  12. URL "https://github.com/boostorg/boost/releases/download/boost-1.83.0/boost-1.83.0.zip"
  13. URL_HASH SHA256=9effa3d7f9d92b8e33e2b41d82f4358f97ff7c588d5918720339f2b254d914c6
  14. LIST_SEPARATOR |
  15. CMAKE_ARGS
  16. -DBOOST_EXCLUDE_LIBRARIES:STRING=contract|fiber|numpy|stacktrace|wave|test
  17. -DBOOST_LOCALE_ENABLE_ICU:BOOL=OFF # do not link to libicu, breaks compatibility between distros
  18. -DBUILD_TESTING:BOOL=OFF
  19. "${_context_abi_line}"
  20. "${_context_arch_line}"
  21. )
  22. set(DEP_Boost_DEPENDS ZLIB)