[CMake] Generating Source Files

Jeremy Cowgar jeremy at cowgar.com
Wed Apr 8 11:05:10 EDT 2009


Jeremy Cowgar wrote:
> Bill Hoffman wrote:
>> Jeremy Cowgar wrote:
>>> I am confused on how that would help me. The ADD_CUSTOM_COMMAND 
>>> generates many source files, and it has dependencies, so it does not 
>>> have to generate source files many times, but sometimes it does. 
>>> When it does, I need the FILE( GLOB .. ) to execute after that 
>>> custom command is run so that the rest of my script can continue.
>>>
>>
>> Is there no way to compute or know the names of all the files that 
>> will be generated at CMake time? 

Ok, our parser now writes a <prgname>.mak file that contains two lines, 
SOURCES=abc.c def.c xyz. and OBJECTS=abc.obj def.obj xyz.obj

However, it does so after translation. Is there a way to read this file 
in *after* the custom command runs? Maybe I can get the list of source 
files that way?

Jeremy




More information about the CMake mailing list