CMakeLists.txt 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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/bison.cmake)
  20. include(cmake/conan.cmake)
  21. include(cmake/global_flags.cmake)
  22. include(cmake/llvm-tools.cmake)
  23. include(cmake/protobuf.cmake)
  24. include(cmake/yandex_common.cmake)
  25. include(cmake/global_vars.cmake)
  26. conan_cmake_configure(
  27. GENERATORS cmake_find_package
  28. REQUIRES
  29. bison/3.5.3
  30. c-ares/1.17.2
  31. libiconv/1.15
  32. openssl/1.1.1l
  33. ragel/6.10
  34. yasm/1.3.0
  35. zlib/1.2.12
  36. IMPORTS
  37. "bin, *yasm* -> ./bin"
  38. "bin, bison* -> ./bin/bison/bin"
  39. "bin, ragel* -> ./bin"
  40. "bin, ytasm* -> ./bin"
  41. "res, * -> ./bin/bison/res"
  42. OPTIONS
  43. libiconv:shared=True
  44. )
  45. conan_cmake_autodetect(settings)
  46. conan_cmake_install(
  47. PATH_OR_REFERENCE .
  48. BUILD missing
  49. REMOTE conancenter
  50. SETTINGS ${settings}
  51. )
  52. if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE)
  53. include(CMakeLists.linux.txt)
  54. elseif (APPLE)
  55. include(CMakeLists.darwin.txt)
  56. endif()