[CMake] multi-line definitions

George Neill georgen at neillnet.com
Tue Sep 23 15:05:05 EDT 2008


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.

HTH,
George.


More information about the CMake mailing list