aboutsummaryrefslogtreecommitdiffstats
path: root/build/export_generators
diff options
context:
space:
mode:
authorsennikovmv <sennikovmv@yandex-team.com>2024-03-13 00:41:16 +0300
committersennikovmv <sennikovmv@yandex-team.com>2024-03-13 00:54:49 +0300
commit9d2c2f680676f5257b6dda9b04926653855ab112 (patch)
tree94f4a8ce1810208e7c015fe327deedcc1666e939 /build/export_generators
parent17bb1bd371ff72b8dff6b22eeed3604fb3d797a9 (diff)
downloadydb-9d2c2f680676f5257b6dda9b04926653855ab112.tar.gz
Cutting cmake conditions from cpp code
Cutting cmake conditions from cpp code Fix issue Support platforms spec 8f9e9bf7663b27406d971a7a7dec526ca6a0480e
Diffstat (limited to 'build/export_generators')
-rw-r--r--build/export_generators/hardcoded-cmake/common_cmake_lists.jinja9
-rw-r--r--build/export_generators/hardcoded-cmake/root_cmake_lists.jinja11
2 files changed, 16 insertions, 4 deletions
diff --git a/build/export_generators/hardcoded-cmake/common_cmake_lists.jinja b/build/export_generators/hardcoded-cmake/common_cmake_lists.jinja
new file mode 100644
index 0000000000..0799708dbd
--- /dev/null
+++ b/build/export_generators/hardcoded-cmake/common_cmake_lists.jinja
@@ -0,0 +1,9 @@
+
+{% include '[generator]/disclaimer.jinja' -%}
+{% for i in range(platform_names|length) %}
+{% if i != 0 %}else{% endif %}if ({{ platforms[platform_names[i]] }})
+ include({{ platform_cmakelists[i] }})
+{%- endfor %}
+{% if platform_names|length > 0 -%}
+endif()
+{% endif -%}
diff --git a/build/export_generators/hardcoded-cmake/root_cmake_lists.jinja b/build/export_generators/hardcoded-cmake/root_cmake_lists.jinja
index 5c9e735ec3..64d5b2cc26 100644
--- a/build/export_generators/hardcoded-cmake/root_cmake_lists.jinja
+++ b/build/export_generators/hardcoded-cmake/root_cmake_lists.jinja
@@ -39,7 +39,10 @@ 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 %}
+{% for i in range(platform_names|length) %}
+{% if i != 0 %}else{% endif %}if ({{ platforms[platform_names[i]] }})
+ include({{ platform_cmakelists[i] }})
+{%- endfor %}
+{% if platform_names|length > 0 -%}
+endif()
+{% endif -%}