[CMake] How to deal with generated source files (w/ dependency tracking) for globs

Craig Scott craig.scott at crascit.com
Thu Apr 14 08:11:01 EDT 2016


It's not quite your situation, but it may have some common elements and the
general idea may get you thinking about what might work for you. This
question/answer I asked this list about last week:

http://stackoverflow.com/q/36084785/1938798

We've been using this approach with success on all the platforms listed
there. In your case, you may want to consider getting your tool that
converts from Nim to C to do that off to the side and only replace the
existing generated C sources with the new ones if they are different.
That's what our particular tool in the above linked article does and it
works rather well for us all as part of one single build. I haven't tried
building within Xcode directly, but we do have scripted builds for iOS
using the Xcode generator which are working.




On Thu, Apr 14, 2016 at 8:40 PM, Eric Wing <ewmailing at gmail.com> wrote:

> On 4/6/16, iosif neitzke <iosif.neitzke+cmake at gmail.com> wrote:
> > I think it depends on when you want the output files from Nim
> > generated and which files are the most frequently developed.
> > If it is usually a one-time generation per clean development session,
> > the simplest case, where the *.NIM source files are not the files
> > most likely to be changed, I would think execute_process should
> > work okay?
> >
>
> Thanks for the responses. In this case, the common use case would be
> writing/changing the NIM files, which in turn require the C files to
> be rewritten. (The users are writing in NIM, and C generation to them
> is just an implementation detail and means to an end.)
>
> It sounds like this is going to be a pain.
>
> I appreciate everybody's responses on this.
>
> Thanks,
> Eric
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>



-- 
Craig Scott
Melbourne, Australia
http://crascit.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160414/40186444/attachment.html>


More information about the CMake mailing list