[CMake] Dependency checker
Michael Wild
themiwi at gmail.com
Thu Sep 9 06:57:11 EDT 2010
AFAIK you need full language support for that. So far I haven't seen a good solution for that problem. CMake definitely needs some reworking there.
Michael
On 9. Sep, 2010, at 11:23 , Benjamin Schindler wrote:
> Hi
>
> Thank you for your quick answer. I had a quick glance - what I don't
> quite understand is how can I integrate this into my custom cmake
> script? I have a ADD_CUSTOM_COMMAND, and in the depends I need this list
> of dependent files (the generated files, not the xsd's themselves).
>
> If you could shed some light on this, that would be very helpful
>
> Thank you
> Benjamin Schindler
>
> On 09/09/2010 11:03 AM, Michael Wild wrote:
>>
>> On 9. Sep, 2010, at 10:15 , Benjamin Schindler wrote:
>>
>>> Hi
>>>
>>> I've written a cmake script for the codesynthesis xsd compiler which
>>> works kindof similar to the qt scripts calling moc etc.
>>> The problem is, that I have no dependency checker. I'd need to parse the
>>> xsd asked for and put all included xsd's in to the dependency list. And
>>> this needs to be cross platform (so exec-program is not really an option...)
>>>
>>> Is there a way in cmake to do that?
>>>
>>> Thank you
>>> Benjamin Schindler
>>
>> Only by modifying the CMake source code. Have a look at the Source/cmDepends* files to get an idea.
>>
>> CMake already contains expat and wraps it in the cmXMLParser, so it should be pretty simple to extract the schemaLocation attributes. What will NOT be so simple is to resolve them (speaking XML catalogs), but you might decide to just skip URIs which are not local (file://) or relative if you don't expect them to change frequently.
>>
>> Michael
>>
>> --
>> There is always a well-known solution to every human problem -- neat, plausible, and wrong.
>> H. L. Mencken
>>
>
--
There is always a well-known solution to every human problem -- neat, plausible, and wrong.
H. L. Mencken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100909/4e81d2fe/attachment.pgp>
More information about the CMake
mailing list