|
@@ -0,0 +1,49 @@
|
|
|
|
+
|
|
|
|
+# This file was generated by the build system used internally in the Yandex monorepo.
|
|
|
|
+# Only simple modifications are allowed (adding source-files to targets, 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 ported back to the
|
|
|
|
+# original buildsystem will not be accepted.
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+cmake_minimum_required(VERSION 3.15)
|
|
|
|
+project({{project_name}} LANGUAGES{% for value in project_language_list %} {{value}}{% endfor %})
|
|
|
|
+
|
|
|
|
+set(BUILD_SHARED_LIBS Off)
|
|
|
|
+set(CMAKE_CXX_STANDARD 20)
|
|
|
|
+set(CMAKE_CXX_EXTENSIONS Off)
|
|
|
|
+set({{project_name}}_MAX_LINK_JOBS 5 CACHE STRING "Maximum parallel link jobs for Ninja generator")
|
|
|
|
+set_property(GLOBAL PROPERTY JOB_POOLS link_jobs=${{ '{' }}{{project_name}}_MAX_LINK_JOBS{{ '}' }})
|
|
|
|
+set(CMAKE_JOB_POOL_LINK link_jobs)
|
|
|
|
+
|
|
|
|
+list(APPEND CMAKE_MODULE_PATH ${{ '{' }}CMAKE_BINARY_DIR{{ '}' }} ${{ '{' }}CMAKE_SOURCE_DIR{{ '}' }}/cmake)
|
|
|
|
+include_directories(${{ '{' }}CMAKE_SOURCE_DIR{{ '}' }} ${{ '{' }}CMAKE_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)
|
|
|
|
+{% for path in includes %}include({{path}})
|
|
|
|
+{%endfor%}{% if use_conan %}
|
|
|
|
+if (CMAKE_CROSSCOMPILING)
|
|
|
|
+ include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
|
|
|
|
+else()
|
|
|
|
+ conan_cmake_autodetect(settings)
|
|
|
|
+ conan_cmake_install(
|
|
|
|
+ PATH_OR_REFERENCE ${CMAKE_SOURCE_DIR}
|
|
|
|
+ INSTALL_FOLDER ${CMAKE_BINARY_DIR}
|
|
|
|
+ BUILD missing
|
|
|
|
+ REMOTE conancenter
|
|
|
|
+ SETTINGS ${settings}
|
|
|
|
+ ENV "CONAN_CMAKE_GENERATOR=${CMAKE_GENERATOR}"
|
|
|
|
+ CONF "tools.cmake.cmaketoolchain:generator=${CMAKE_GENERATOR}"
|
|
|
|
+ )
|
|
|
|
+endif(){% endif %}
|
|
|
|
+{% for i in range(platform_flags|length) %}
|
|
|
|
+{% if i != 0 %}else{% endif %}if ({{ platform_flags[i] }})
|
|
|
|
+ include({{ platform_cmakelists[i] }}){%endfor%}
|
|
|
|
+{% if platform_flags|length > 0%}endif(){% endif %}
|