mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 05:11:15 -06:00
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
16 lines
369 B
CMake
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
|
|
)
|