https://github.com/catboost/catboost
Raw File
Tip revision: 5c632a708cd2fdb127c74115e989da4507d8bc9a authored by akhropov on 05 April 2024, 20:59:30 UTC
Update getCurrentMachineResourcesDirs documentation
Tip revision: 5c632a7
CMakeLists.txt

# This file was generated by the build system used internally in the Yandex and called "ya"
# (https://github.com/yandex/yatool).
#
# Configuration files of ya build system usually named as ya.make. If ya.make file is presented
# at the  root of the repository, then this repository supports ya build. 
# 
# If the repository supports both CMake and ya build configuration, please modify both of them.
#
# If only CMake build configuration is supported then modify only CMake files and note that only
# simple modifications are allowed like adding source-files to targets or adding simple properties
# like target_include_directories. These modifications will be ported to original ya.make files
# by maintainers. Any complex modifications which can't be easily ported back to the ya build 
# system may be rejected.


cmake_minimum_required(VERSION 3.15)
project(CATBOOST LANGUAGES C CXX ASM)

set(BUILD_SHARED_LIBS Off)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_EXTENSIONS Off)
set(CATBOOST_MAX_LINK_JOBS 5 CACHE STRING "Maximum parallel link jobs for Ninja generator")
set_property(GLOBAL PROPERTY JOB_POOLS link_jobs=${CATBOOST_MAX_LINK_JOBS})
set(CMAKE_JOB_POOL_LINK link_jobs)

list(APPEND CMAKE_MODULE_PATH ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake)
include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR})
list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure")
enable_testing()

# Disable 'empty CUDA_ARCHITECTURES not allowed' warning
# Can't set it in cuda.cmake because of CMake policy subdirectory stack rules
cmake_policy(SET CMP0104 OLD)

include(cmake/global_flags.cmake)
include(cmake/global_vars.cmake)
include(cmake/archive.cmake)
include(cmake/common.cmake)
include(cmake/conan.cmake)
include(cmake/cuda.cmake)
include(cmake/cython.cmake)
include(cmake/fbs.cmake)
include(cmake/protobuf.cmake)
include(cmake/recursive_library.cmake)
include(cmake/shared_libs.cmake)
include(cmake/swig.cmake)

if (CMAKE_CROSSCOMPILING)
  include(${PROJECT_BINARY_DIR}/conan_paths.cmake)
else()
  conan_cmake_autodetect(settings)
  conan_cmake_install(
    PATH_OR_REFERENCE ${PROJECT_SOURCE_DIR}
    INSTALL_FOLDER ${PROJECT_BINARY_DIR}
    BUILD missing
    REMOTE conancenter
    SETTINGS ${settings}
      ENV "CONAN_CMAKE_GENERATOR=${CMAKE_GENERATOR}"
      CONF "tools.cmake.cmaketoolchain:generator=${CMAKE_GENERATOR}"
  )
endif()

if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT HAVE_CUDA)
  include(CMakeLists.linux-x86_64.txt)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND HAVE_CUDA)
  include(CMakeLists.linux-x86_64-cuda.txt)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND NOT HAVE_CUDA)
  include(CMakeLists.linux-aarch64.txt)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND HAVE_CUDA)
  include(CMakeLists.linux-aarch64-cuda.txt)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le" AND NOT HAVE_CUDA)
  include(CMakeLists.linux-ppc64le.txt)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le" AND HAVE_CUDA)
  include(CMakeLists.linux-ppc64le-cuda.txt)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
  include(CMakeLists.darwin-x86_64.txt)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
  include(CMakeLists.darwin-arm64.txt)
elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA)
  include(CMakeLists.windows-x86_64.txt)
elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND HAVE_CUDA)
  include(CMakeLists.windows-x86_64-cuda.txt)
elseif (ANDROID AND CMAKE_ANDROID_ARCH STREQUAL "arm")
  include(CMakeLists.android-arm.txt)
elseif (ANDROID AND CMAKE_ANDROID_ARCH STREQUAL "arm64")
  include(CMakeLists.android-arm64.txt)
elseif (ANDROID AND CMAKE_ANDROID_ARCH STREQUAL "x86")
  include(CMakeLists.android-x86.txt)
elseif (ANDROID AND CMAKE_ANDROID_ARCH STREQUAL "x86_64")
  include(CMakeLists.android-x86_64.txt)
endif()

back to top