CMakeLists.txt 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # This file was gererated by the build system used internally in the Yandex monorepo.
  2. # Only simple modifications are allowed (adding source-files to targets, adding simple properties
  3. # like target_include_directories). These modifications will be ported to original
  4. # ya.make files by maintainers. Any complex modifications which can't be ported back to the
  5. # original buildsystem will not be accepted.
  6. cmake_minimum_required(VERSION 3.15)
  7. project(YDB LANGUAGES ASM C CXX)
  8. set(BUILD_SHARED_LIBS Off)
  9. set(CMAKE_CXX_STANDARD 20)
  10. set(CMAKE_CXX_EXTENSIONS Off)
  11. set(YDB_MAX_LINK_JOBS 5 CACHE STRING "Maximum parallel link jobs for Ninja generator")
  12. set_property(GLOBAL PROPERTY JOB_POOLS link_jobs=${YDB_MAX_LINK_JOBS})
  13. set(CMAKE_JOB_POOL_LINK link_jobs)
  14. list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake)
  15. include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
  16. list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure")
  17. enable_testing()
  18. include(cmake/antlr.cmake)
  19. include(cmake/archive.cmake)
  20. include(cmake/bison.cmake)
  21. include(cmake/conan.cmake)
  22. include(cmake/global_flags.cmake)
  23. include(cmake/llvm-tools.cmake)
  24. include(cmake/protobuf.cmake)
  25. include(cmake/yandex_common.cmake)
  26. include(cmake/global_vars.cmake)
  27. conan_cmake_configure(
  28. GENERATORS cmake_find_package
  29. REQUIRES
  30. bison/3.5.3
  31. c-ares/1.18.1
  32. libiconv/1.15
  33. openssl/1.1.1l
  34. ragel/6.10
  35. yasm/1.3.0
  36. zlib/1.2.12
  37. IMPORTS
  38. "bin, *yasm* -> ./bin"
  39. "bin, bison* -> ./bin/bison/bin"
  40. "bin, ragel* -> ./bin"
  41. "bin, ytasm* -> ./bin"
  42. "res, * -> ./bin/bison/res"
  43. OPTIONS
  44. libiconv:shared=True
  45. )
  46. conan_cmake_autodetect(settings)
  47. conan_cmake_install(
  48. PATH_OR_REFERENCE .
  49. BUILD missing
  50. REMOTE conancenter
  51. SETTINGS ${settings}
  52. )
  53. if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE AND NOT ANDROID)
  54. include(CMakeLists.linux.txt)
  55. elseif (APPLE)
  56. include(CMakeLists.darwin.txt)
  57. endif()