Closed dfaure-kdab closed 3 years ago
In fact what we'd like is: if kdwsdl2cpp has changed, enable compare-output, otherwise disable it. But that's too much magic, even for cmake :-)
Many thanks cleaning out my mess @dfaure-kdab ! I appologize for not looking into this earlier.
If it's not set (i.e. by default), we always write out the new file which allows the buildsystem to know the job is done, and to avoid doing it again unnecessarily. It will rebuild code this time around, but not on subsequent times, until the source or the code generator changes. This is the standard mode of operation, moc, uic etc. work that way.
If the env var is set (to anything, e.g. 1) then the files are only re-generated if different from the existing ones. This is mostly useful when doing much work on the code generator itself.