You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
546 B
17 lines
546 B
add_custom_target(foobar
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
${CMAKE_CURRENT_SOURCE_DIR}/generated.h.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/generated.h
|
|
)
|
|
|
|
add_custom_command(
|
|
OUTPUT generated.hpp
|
|
# This test will fail if DEPENDS isn't accounted for in the codegen build graph
|
|
DEPENDS foobar
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/generated.h
|
|
${CMAKE_CURRENT_BINARY_DIR}/generated.hpp
|
|
CODEGEN
|
|
)
|
|
|
|
add_custom_target(hpp_creator ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/generated.hpp)
|