From 2c27e6f978166bc64eb8836cd56efe8adef7dd6f Mon Sep 17 00:00:00 2001 From: AlexSm Date: Tue, 22 Oct 2024 10:36:25 +0200 Subject: [PATCH] Do not include python codegen into cmake codegen (#10697) --- ydb/core/base/generated/ya.make | 56 +++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/ydb/core/base/generated/ya.make b/ydb/core/base/generated/ya.make index b6786fab5257..49cd39c9a7f0 100644 --- a/ydb/core/base/generated/ya.make +++ b/ydb/core/base/generated/ya.make @@ -4,34 +4,44 @@ PEERDIR( ydb/core/protos ) -RUN_PROGRAM( - ydb/core/base/generated/codegen - runtime_feature_flags.h.in +IF (EXPORT_CMAKE) + # No Python codegen in cmake, pregenerate from ya to compile + SRCS( runtime_feature_flags.h - IN runtime_feature_flags.h.in - OUT runtime_feature_flags.h - OUTPUT_INCLUDES - util/system/types.h - atomic - tuple -) - -RUN_PROGRAM( - ydb/core/base/generated/codegen - runtime_feature_flags.cpp.in runtime_feature_flags.cpp - IN runtime_feature_flags.cpp.in - OUT runtime_feature_flags.cpp - OUTPUT_INCLUDES - ydb/core/base/generated/runtime_feature_flags.h - ydb/core/protos/feature_flags.pb.h -) + ) +ELSE() + RUN_PROGRAM( + ydb/core/base/generated/codegen + runtime_feature_flags.h.in + runtime_feature_flags.h + IN runtime_feature_flags.h.in + OUT runtime_feature_flags.h + OUTPUT_INCLUDES + util/system/types.h + atomic + tuple + ) + + RUN_PROGRAM( + ydb/core/base/generated/codegen + runtime_feature_flags.cpp.in + runtime_feature_flags.cpp + IN runtime_feature_flags.cpp.in + OUT runtime_feature_flags.cpp + OUTPUT_INCLUDES + ydb/core/base/generated/runtime_feature_flags.h + ydb/core/protos/feature_flags.pb.h + ) +ENDIF() END() -RECURSE( - codegen -) +IF (NOT EXPORT_CMAKE) + RECURSE( + codegen + ) +ENDIF() RECURSE_FOR_TESTS( ut