CMakeLists.txt 1.8 KB

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