mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 14:20:06 -06:00
Since commit df58dbb0e9 (VS: Add CMake input files to ZERO_CHECK,
2023-03-19, v3.27.0-rc1~157^2), projects that specify the same file both
as input to `configure_file` and as the `MAIN_DEPENDENCY` of a custom
command fail to configure. Revert the change pending further
investigation. Add a test case demonstrating the problem.
Issue: #24557
Fixes: #25149
10 lines
286 B
CMake
10 lines
286 B
CMake
configure_file(ConfigureFile.in foo.txt @ONLY)
|
|
add_custom_target(foo)
|
|
add_custom_command(
|
|
OUTPUT bar.txt
|
|
MAIN_DEPENDENCY ConfigureFile.in # Attach to input of configure_file
|
|
DEPENDS foo
|
|
COMMAND ${CMAKE_COMMAND} -E copy foo.txt bar.txt
|
|
)
|
|
add_custom_target(bar DEPENDS bar.txt)
|