aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/common.cmake
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-01-31 17:22:33 +0300
committerAlexander Smirnov <alex@ydb.tech>2024-01-31 17:22:33 +0300
commit52be5dbdd420165c68e7e90ba8f1d2f00da041f6 (patch)
tree5d47f5b2ff4e6a7c8e75d33931a1e683949b7229 /cmake/common.cmake
parentea57c8867ceca391357c3c5ffcc5ba6738b49adc (diff)
parent809f0cf2fdfddfbeacc2256ffdbaaf5808ce5ed4 (diff)
downloadydb-52be5dbdd420165c68e7e90ba8f1d2f00da041f6.tar.gz
Merge branch 'mergelibs12' into main
Diffstat (limited to 'cmake/common.cmake')
-rw-r--r--cmake/common.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/common.cmake b/cmake/common.cmake
index f85875ec40..98313341a5 100644
--- a/cmake/common.cmake
+++ b/cmake/common.cmake
@@ -103,7 +103,7 @@ endfunction()
function(generate_enum_serilization Tgt Input)
set(opts "")
- set(oneval_args INCLUDE_HEADERS)
+ set(oneval_args INCLUDE_HEADERS GEN_HEADER)
set(multival_args "")
cmake_parse_arguments(ENUM_SERIALIZATION_ARGS
"${opts}"
@@ -116,7 +116,7 @@ function(generate_enum_serilization Tgt Input)
get_filename_component(BaseName ${Input} NAME)
add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BaseName}_serialized.cpp
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BaseName}_serialized.cpp ${ENUM_SERIALIZATION_ARGS_GEN_HEADER}
COMMAND
${enum_parser_bin}
${Input}
@@ -124,6 +124,9 @@ function(generate_enum_serilization Tgt Input)
--output ${CMAKE_CURRENT_BINARY_DIR}/${BaseName}_serialized.cpp
DEPENDS ${Input} ${enum_parser_dependency}
)
+ if (ENUM_SERIALIZATION_ARGS_GEN_HEADER)
+ set_property(SOURCE ${ENUM_SERIALIZATION_ARGS_GEN_HEADER} PROPERTY GENERATED On)
+ endif()
target_sources(${Tgt} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/${BaseName}_serialized.cpp)
endfunction()