Am Montag, 15. Oktober 2012 um 15:51:39, schrieb David Cole 
<david.c...@kitware.com>
> Consider an alternate approach:
> 
> Write a header file named "xx.define.h" and include it ONLY in x.cpp.
> 
> #define XX "seomthing"
> 
> Then you don't even have to re-run CMake to change the definition of
> XX. Just edit the header file and re-compile.
> 
> Especially when you realize you've misspelled something.
> 
> 
> :-)
> 

Thanks, did something similar. Since the define-value is created dynamically
I used configure_file(...) to create the include.

        Kornel

> On Mon, Oct 15, 2012 at 3:47 PM, Kornel Benko <kor...@lyx.org> wrote:
> > Am Montag, 15. Oktober 2012 um 15:40:18, schrieb Brad King
> > <brad.k...@kitware.com>
> >
> >> On 10/15/2012 03:26 PM, Kornel Benko wrote:
> >
> >> > Unfortunately, if "something" changes, the effect is, that _all_ sources
> >> > in the relevant
> >
> >> > directory are recompiled. (I expected the recompilation of x.cpp only).
> >
> >> >
> >
> >> > This may depend on the build system. In my case "Unix makefiles". The
> >> > reason is
> >
> >> >
> >
> >> > that each object file created for this directory depends on
> >> > "flags.make", which changes accordingly.
> >
> >> >
> >
> >> > If one has hundreds of files in the source dir, this is less welcome.
> >
> >>
> >
> >> This is a known limitation of the Makefile generator. We cannot use
> >
> >> a per-object flags.make file because some filesystems are EXTREMELY
> >
> >> slow at using lots of tiny files. There may be an issue tracker
> >
> >> entry asking for this to be solved, but I don't think it ever will
> >
> >> be.
> >
> >>
> >
> >> -Brad
> >
> >
> >
> > Thanks Brad. I nearly expected/feared something like this. Pity.
> >
> >
> >
> > Kornel
> >
> >

Attachment: signature.asc
Description: This is a digitally signed message part.

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to