mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 14:48:19 -05:00
06feb845aa
Under the CMP0118 NEW behavior, sources generated in one directory
should be visible when added to targets in other directories. This was
accidentally left out of commit 6624b65b3f (GENERATED prop: Add
implementation for policy CMP0118 being set to NEW, 2020-11-09,
v3.20.0-rc1~393^2~1).
Fixes: #18399
10 lines
226 B
CMake
10 lines
226 B
CMake
add_custom_command(
|
|
OUTPUT sub.txt
|
|
COMMAND ${CMAKE_COMMAND} -E touch sub.txt
|
|
VERBATIM
|
|
)
|
|
add_custom_target(gen DEPENDS sub.txt)
|
|
|
|
add_dependencies(top gen)
|
|
target_sources(top PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/sub.txt)
|