mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 20:00:51 -05:00
197cb419d1
By specifying CODEGEN as an argument to add_custom_command the custom command will be added to a codegen build target. The intent is to provide a convenient way for users to get their generated files without having to build the whole project. This can be helpful for code analysis tools which can be useful for IDEs and CI.
7 lines
220 B
CMake
7 lines
220 B
CMake
# CMake should warn the user if they have a target named codegen.
|
|
add_custom_target(codegen
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
${CMAKE_CURRENT_SOURCE_DIR}/generated.h.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/generated.h
|
|
)
|