opensource.conf 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. EXPORT_CMAKE=no
  2. when ($CATBOOST_OPENSOURCE == "yes") {
  3. OPENSOURCE=yes
  4. CFLAGS+=-DCATBOOST_OPENSOURCE=yes
  5. CXXFLAGS+=-DCATBOOST_OPENSOURCE=yes
  6. }
  7. when ($OPENSOURCE) {
  8. LOCAL_YDB_DOCKER_PUBLIC_BUILD=yes
  9. CATBOOST_OPENSOURCE=yes
  10. USE_DYNAMIC_IDN=yes
  11. USE_DYNAMIC_AIO=yes
  12. USE_DYNAMIC_ICONV=yes
  13. USE_ASMLIB=no
  14. SO_OUTPUTS=yes
  15. UDF_NO_PROBE=yes
  16. HAVE_MKL=no
  17. USE_MKL=no
  18. }
  19. # Extra macros to control how cmake export works
  20. CMAKE_PACKAGE=
  21. CMAKE_PACKAGE_COMPONENT=
  22. CMAKE_PACKAGE_TARGET=
  23. CONAN_REFERENCE=
  24. CONAN_PKG_OPTS=
  25. ### @usage: OPENSOURCE_EXPORT_REPLACEMENT(CMAKE PkgName CMAKE_TARGET PkgName::PkgTarget CONAN ConanRef CMAKE_COMPONENT OptCmakePkgComponent)
  26. ###
  27. ### Use specified conan/system pacakcge when exporting cmake build scripts for arcadia C++ project
  28. ### for opensource publication.
  29. macro OPENSOURCE_EXPORT_REPLACEMENT(CMAKE[], CMAKE_TARGET[], CMAKE_COMPONENET[], CONAN[], CONAN_OPTIONS[]) {
  30. SET(CMAKE_PACKAGE $CMAKE)
  31. SET(CMAKE_PACKAGE_COMPONENT $CMAKE_COMPONENET)
  32. SET(CMAKE_LINK_TARGET $CMAKE_TARGET)
  33. SET(CONAN_REFERENCE $CONAN)
  34. SET(CONAN_PKG_OPTS $CONAN_OPTIONS)
  35. }
  36. CMAKE_TARGET_NAME=$REALPRJNAME
  37. CMAKE_TARGET_ARTEFACT_RENAME_RULES=
  38. ### @usage CMAKE_EXPORTED_TARGET_NAME(Name)
  39. ###
  40. ### Forces to use the name given as cmake target name without changing the name of output artefact.
  41. ### This macro should be used to resolve target name conflicts in exported cmake project when
  42. ### changing module name is not applicable. For example both CUDA and non-CUDA py modules for
  43. ### catboost should have same name lib_catboost.so and both of them are defined as PY_ANY_MODULE(_catboost).
  44. ### adding CMAKE_EXPORTED_TARGET_NAME(_catboost_non_cuda) to the non CUDA module ya.make file
  45. ### changes exported cmake target name but preserve generated artefact file name.
  46. macro CMAKE_EXPORTED_TARGET_NAME(Name) {
  47. SET(CMAKE_TARGET_NAME $Name)
  48. SET(CMAKE_TARGET_ARTEFACT_RENAME_RULES && set_target_property OUTPUT_NAME $REALPRJNAME)
  49. }