Re: [CMake] Handling generated headers

2017-03-27 Thread Michael Ellery
> On Mar 27, 2017, at 2:57 PM, Bruce Stephens > wrote: > > Yes, that's the idea: I have custom commands (created with > add_custom_command) listing the headers in OUTPUT. > > And there are source files which #include such headers. > > I'd like it so that compiling such a source file would cau

Re: [CMake] Handling generated headers

2017-03-27 Thread Bruce Stephens
Yes, that's the idea: I have custom commands (created with add_custom_command) listing the headers in OUTPUT. And there are source files which #include such headers. I'd like it so that compiling such a source file would cause the header to be generated. Concretely, with a CMakeLists.txt like th

Re: [CMake] Handling generated headers

2017-03-27 Thread Michael Ellery
> On Mar 27, 2017, at 6:31 AM, Bruce Stephens > wrote: > > I have a build with two or three tools that generate headers and > source files. Getting the source files compiled is easy enough: when > they're mentioned as source files (in add_library or add_executable) > the custom rule gets trigge

[CMake] Handling generated headers

2017-03-27 Thread Bruce Stephens
I have a build with two or three tools that generate headers and source files. Getting the source files compiled is easy enough: when they're mentioned as source files (in add_library or add_executable) the custom rule gets triggered. But that doesn't seem to be true for header files included by n