aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsennikovmv <sennikovmv@yandex-team.com>2024-03-21 14:26:48 +0300
committersennikovmv <sennikovmv@yandex-team.com>2024-03-21 14:39:42 +0300
commita53609cf223c7b528f9be8bf726553ae41d90f44 (patch)
tree5bacb025ac3027c688d82b216a877901c275218a
parent6644dfa46bec3f8bd4e5416dc49f7b2f6c566963 (diff)
downloadydb-a53609cf223c7b528f9be8bf726553ae41d90f44.tar.gz
New templates for cmake-generator
3af1cab32d3e28b7961c68f5b8e8af1d1fc81505
-rw-r--r--build/export_generators/hardcoded-cmake/generator.toml40
-rw-r--r--build/export_generators/hardcoded-cmake/root_cmake_lists.jinja12
2 files changed, 48 insertions, 4 deletions
diff --git a/build/export_generators/hardcoded-cmake/generator.toml b/build/export_generators/hardcoded-cmake/generator.toml
index 9a1e044763..b439974032 100644
--- a/build/export_generators/hardcoded-cmake/generator.toml
+++ b/build/export_generators/hardcoded-cmake/generator.toml
@@ -198,3 +198,43 @@ copy=[
"build/scripts/gather_swig_java.cmake"
]
add_values=[{attr="includes", values=["cmake/swig.cmake"]}]
+
+# Conan profiles for platforms
+[[rules]]
+platforms=[
+ "android-arm",
+ "android-arm32"
+]
+copy=["cmake/conan-profiles/android.armv7.profile"]
+
+[[rules]]
+platforms=["android-arm64"]
+copy=["cmake/conan-profiles/android.arm64.profile"]
+
+[[rules]]
+platforms=["android-x86"]
+copy=["cmake/conan-profiles/android.x86.profile"]
+
+[[rules]]
+platforms=["android-x86_64"]
+copy=["cmake/conan-profiles/android.x86_64.profile"]
+
+[[rules]]
+platforms=[
+ "linux-aarch64",
+ "linux-arm64",
+ "linux-aarch64-cuda",
+ "linux-arm64-cuda"
+]
+copy=["cmake/conan-profiles/linux.aarch64.profile"]
+
+[[rules]]
+platforms=[
+ "linux-ppc64le",
+ "linux-ppc64le-cuda"
+]
+copy=["cmake/conan-profiles/linux.ppc64le.profile"]
+
+[[rules]]
+platforms=["darwin-arm64"]
+copy=["cmake/conan-profiles/macos.arm64.profile"]
diff --git a/build/export_generators/hardcoded-cmake/root_cmake_lists.jinja b/build/export_generators/hardcoded-cmake/root_cmake_lists.jinja
index 5c9e735ec3..5c564061ef 100644
--- a/build/export_generators/hardcoded-cmake/root_cmake_lists.jinja
+++ b/build/export_generators/hardcoded-cmake/root_cmake_lists.jinja
@@ -39,7 +39,11 @@ else()
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 %}
+{% set platforms_count = platform_names|length -%}
+{% if platforms_count > 0 -%}
+{% for i in range(platforms_count) %}
+{% if i != 0 %}else{% endif %}if ({{ platforms[platform_names[i]] }})
+ include({{ platform_cmakelists[i] }})
+{%- endfor %}
+endif()
+{% endif -%}