How do you specify that an executable depends on all source files in a
directory? I've tried doing it like:
add_executable(foo src/*.cc)
but that only seems to pick up the first source file?
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/openso
On Saturday 25 August 2012, Russell Wallace wrote:
> How do you specify that an executable depends on all source files in a
> directory? I've tried doing it like:
>
> add_executable(foo src/*.cc)
>
> but that only seems to pick up the first source file?
Explicitely list all of them.
Globbing is
I don't understand what you mean, but explicit listing violates DRY in
a big way with the usual consequence, the two lists will inevitably
get out of sync. I'd rather use globbing (unless CMake has some other
method that doesn't involve trying to keep things in sync by hand)?
Even plain Make can us
Am Samstag, 25. August 2012 um 10:53:48, schrieb Russell Wallace
> I don't understand what you mean, but explicit listing violates DRY in
> a big way with the usual consequence, the two lists will inevitably
> get out of sync. I'd rather use globbing (unless CMake has some other
> method that doe
On Sat, Aug 25, 2012 at 10:59 AM, Kornel Benko wrote:
> The you may want to try
>
> file(GLOB foo_sources . src/*.cc)
>
> add_executable(foo ${foo_sources})
That works, thanks!
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensourc
On Saturday 25 August 2012, Russell Wallace wrote:
> I don't understand what you mean, but explicit listing violates DRY in
> a big way with the usual consequence, the two lists will inevitably
> get out of sync.
Yes, but here this is good IMO, since in general a file laying around in some
direct
Am Samstag, 25. August 2012 um 12:04:21, schrieb Alexander Neundorf
> On Saturday 25 August 2012, Russell Wallace wrote:
> > I don't understand what you mean, but explicit listing violates DRY in
> > a big way with the usual consequence, the two lists will inevitably
> > get out of sync.
>
> Yes
Kornel Benko wrote:
> Am Samstag, 25. August 2012 um 10:53:48, schrieb Russell Wallace
>
> > I don't understand what you mean, but explicit listing violates DRY in
> > a big way with the usual consequence, the two lists will inevitably
> > get out of sync. I'd rather use globbing (unless CMake has
2012/8/25 Russell Wallace :
> I don't understand what you mean, but explicit listing violates DRY in
> a big way with the usual consequence, the two lists will inevitably
> get out of sync. I'd rather use globbing (unless CMake has some other
> method that doesn't involve trying to keep things in s
On Sat, Aug 25, 2012 at 2:19 PM, Eric Noulard 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 C
2012/8/25 Russell Wallace :
> On Sat, Aug 25, 2012 at 2:19 PM, Eric Noulard wrote:
>> Does your VCS (git, cvs, svn,...) do globbing for adding/removing files ?
>
> Git. And yes, of course it does.
No sorry, I wasn't clear enough
unless I'm wrong you can do:
git add blah*.c
but :
1) If you ad
No, you can type e.g. 'git add .' to add all newly created files to
the repository.
It is true that you do have to prompt git to do that, it won't go off
looking for new files on its own initiative. And I'm not expecting
cmake to go off looking for new files on its own initiative either; as
anothe
2012/8/25 Russell Wallace :
> No, you can type e.g. 'git add .' to add all newly created files to
> the repository.
Yes I know but git handling is "binary" either a file is handled
by git or not.
With CMake a source could be
- to be added to some add_library (1 or several)
- to be added to so
On Sun, Aug 26, 2012 at 8:55 AM, Eric Noulard wrote:
> Like I said even if the new file is a "cpp" file, should CMake add
> it to add_executable or add_library or...
If different C++ source files have different purposes, I would put
them in different directories.
> I know that you want to specif
2012/8/26 Russell Wallace :
> On Sun, Aug 26, 2012 at 8:55 AM, Eric Noulard wrote:
>> Like I said even if the new file is a "cpp" file, should CMake add
>> it to add_executable or add_library or...
>
> If different C++ source files have different purposes, I would put
> them in different directori
Russell Wallace wrote:
> On Sun, Aug 26, 2012 at 8:55 AM, Eric Noulard
wrote:
> > Like I said even if the new file is a "cpp" file, should CMake add
> > it to add_executable or add_library or...
>
> If different C++ source files have different purposes, I would put
> them in different directorie
On Sunday 26 August 2012, Russell Wallace wrote:
> On Sun, Aug 26, 2012 at 8:55 AM, Eric Noulard
wrote:
> > Like I said even if the new file is a "cpp" file, should CMake add
> > it to add_executable or add_library or...
>
> If different C++ source files have different purposes, I would put
> th
17 matches
Mail list logo