Files
CMake/Tests/RunCMake/Codegen/SubDir-common.cmake
Brad King 5ce1ca607f Ninja: Add missing top-level codegen dependencies on per-directory codegen
In commit 197cb419d1 (add_custom_command: Add CODEGEN support,
2024-05-27, v3.31.0-rc1~394^2) we accidentally left out the global
`codegen` target's dependencies on the per-directory `codegen` targets.
Add them for parity with the `all` target.

Fixes: #26517
2024-12-10 11:46:31 -05:00

16 lines
369 B
CMake

add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/generated.h
COMMAND
${CMAKE_COMMAND} -E
copy ${CMAKE_CURRENT_SOURCE_DIR}/generated.h.in
${CMAKE_CURRENT_BINARY_DIR}/generated.h
CODEGEN
)
add_library(errorlib_top
# If this library is built error.c will cause the build to fail
error.c
${CMAKE_CURRENT_BINARY_DIR}/generated.h
)