Skip to content

Commit 51ef1d0

Browse files
committed
cmake: Add mp_proxy_codegen custom target
This convenience target allows generating Cap'n Proto C++ source files, which is useful as the `capnp_generate_cpp` function is not CODEGEN-aware.
1 parent 61de697 commit 51ef1d0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ configure_file(include/mp/config.h.in "${CMAKE_CURRENT_BINARY_DIR}/include/mp/co
139139
# Generated C++ Capn'Proto schema files
140140
capnp_generate_cpp(MP_PROXY_SRCS MP_PROXY_HDRS include/mp/proxy.capnp)
141141
set_source_files_properties("${MP_PROXY_SRCS}" PROPERTIES SKIP_LINTING TRUE) # Ignored before cmake 3.27
142+
# Add a convenience custom target that allows generating
143+
# Cap'n Proto C++ source files, which is useful as
144+
# the `capnp_generate_cpp` function is not CODEGEN-aware.
145+
add_custom_target(mp_headers DEPENDS ${MP_PROXY_HDRS})
142146

143147
# util library
144148
add_library(mputil OBJECT src/mp/util.cpp)

0 commit comments

Comments
 (0)