[CMake] Applying command to source files

Eric Noulard eric.noulard at gmail.com
Fri Nov 16 16:55:45 EST 2007


2007/11/16, Hendrik Sattler <post at hendrik-sattler.de>:
> Am Freitag 16 November 2007 schrieb Eric Noulard:
> > 2007/11/16, Juan Sanchez <Juan.Sanchez at amd.com>:
> > > Shouldn't that be a script in your source code management tool?  For
> > > example, the indentation policy will be enforced the moment the file is
> > > checked in.
> >
> > Yes your are damn right, and I did this in the past.
>
> There difference is that cmake tries to not change the source tree while you
> want to do exactly that. Especially since code beautifying doesn't help the
> compiler.

Yes I know.
I only wanted to do it "on demand" with something like
a non-default target (EXCLUDE_FROM_ALL).
You may want to run that target before submitting a patch
or before commiting. not _always_ when you build.

> > But, the fact is the concerned project is hosted on a server
> > where I have not enough privilege to run such scripts
> > for security reason.
> >
> > I don't think that popular project hosting service
> > like Sourceforge, BerliOS, Savannah do authorize such "user" scripts.
>
> Sometimes, they do. You could ask.

In my current case it's Savannah, I'll ask, however as said before
on-demand beautifying may be acceptable too.

> If you cannot do this server-side, you can use a wrapper script around the
> commit command.

That's true but since developpers uses a variety of Editor/IDE/CVS tools
combination I was thinking of something more
"environment agnostic".

Thanks you very much for your comments
-- 
Erk


More information about the CMake mailing list