[CMake] multi-line definitions

Timenkov Yuri ytimenkov at gmail.com
Wed Sep 24 10:57:30 EDT 2008


On Tue, Sep 23, 2008 at 11:05 PM, George Neill <georgen at neillnet.com> wrote:

> Hi Manu,
>
> On Tue, Sep 23, 2008 at 1:54 PM, Emmanuel Blot <eblotml at free.fr> wrote:
> >> The only way would be something like this:
> >>
> >> set(a "-mcpu=arm7tdmi -std=gnu99 -fgnu89-inline -finline-functions")
> >> set(a "${a} -ffunction-sections -fdata-sections ")
> >> set(a "${a} -fno-strict-aliasing -mno-thumb -Os -fomit-frame-pointer")
>
> I use a list.
>
> SET(MY_C_FLAGS
>  -O3
>  -m32
>  -DNDEBUG
>  -D_LARGEFILE_SOURCE
>  -D_FILE_OFFSET_BITS=64
>  -s # strip debug symbols
> )
>
> Then turn it into a string later, I haven't ran into any issues doing
> it this way yet.

But this turns into list (in terms of cmake) that is string with
semicolon-separated elements (not space-separated).
And this may be a problem in some cases, and initial compile flags seems to
be the case.

>
>
> HTH,
> George.
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080924/41bd47af/attachment-0001.htm>


More information about the CMake mailing list