[CMake] Starting with Cmake

Tyler Roscoe tyler at cryptio.net
Tue Jul 14 00:46:02 EDT 2009


If you only quote the interesting part, it makes the thread easier to
read.

On Tue, Jul 14, 2009 at 11:46:51AM +0800, Dong Tiger wrote:
> > > 5. Say I have something like:
> > > SET(SRCS file1.c file2.c file3.c)
> > > Can I write this like:
> > > SET(SRCS /
> > >       file1.c /
> > >       file2.c /
> > >       file3.c
> > > )
> > >
> > > Like one file name per line like I can do in a gnu Make File?
> >
> >
> > I'm not sure why you put those / in there (did you mean \ ?) but CMake
> > is pretty tolerant of whitespace. Just write:
> >
> > set (srcs
> >     file1.c
> >    file2.c
> >    file3.c
> > )

> What about a long command line in ADD_CUSTOM_COMMAND? Can I break it into
> multiple lines?

I would just try it and see what happens. CMake will usually tell you
pretty quickly if you've gotten something really wrong.

But yes, CMake ignores whitespace unless you do something weird like try
to quote it, like this: "




".

tyler


More information about the CMake mailing list