add_custom_command for INTERFACE file ignored
Hi CMake developers,
I have the problem that an add_custom_command
for an INTERFACE
file is silently ignored and no rule is generated in the Ninja build file.
The problem is as follows:
- A
CMakeLists.txt
in subdirectorya
creates theOBJECT
libraryrequires_header
. - The root
CMakeLists.txt
includes this subdirectorya
viaadd_subdirectory
. - The root
CMakeLists.txt
provides anINTERFACE
libraryprovides_header
. It provides a filemyheader.h
and is linked torequires_header
. - A custom command to generate
myheader.h
file is defined in the root file. - This custom command seems to be ignored by the build generator.
For clarification I have attached the example described above.
Is this issue related to #18399 (closed)? If so, is there any attempt to fix or improve that behavior?