[CMake] Executable depending on all source files

Russell Wallace russell.wallace at gmail.com
Sat Aug 25 13:43:26 EDT 2012


On Sat, Aug 25, 2012 at 2:19 PM, Eric Noulard <eric.noulard at gmail.com> wrote:
> Does your VCS (git, cvs, svn,...) do globbing for adding/removing files ?

Git. And yes, of course it does.

> What you 'could do' is to craft some scripts (CMake or else) that
> may automagically update the extensive list of sources in your CMakeLists.txt.
> This script may be launched by a CMake custom target of yours, e.g.
> then you'll be able to do
>
> make up_src_list
>
> instead of editing the CMakeLists.txt manually,

Sure, that would have been my fallback, treat CMakeLists.txt as object
code and write a Python script to maintain it automatically. But
adding an extra layer like that is strictly inferior to a solution
that works within CMake.


More information about the CMake mailing list