[cmake-developers] [wishlist BUG?] limit on the length of the CFLAGS environment variable too small?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Mon Aug 1 15:42:22 EDT 2011


On 2011-08-01 15:01-0400 Brad King wrote:

> On 07/31/2011 02:54 PM, Alan W. Irwin wrote:
>> It looks okay to me, but I am not familiar with the format of that
>> file so I have attached it so you can see for yourself.  Also, to help
>> you replicate exactly what I did using the minimal CMakeLists.txt file
>> I posted, here is how I created that CFLAGS:
>>
>> export CFLAGS=$(gcc -c -Q -O0 --help=optimizers \
>> |grep enabled |sed -e "s?\\[enabled\\]? ?g" -e "s? -f? -fno-?g")
>> CFLAGS="-g $CFLAGS"
>
> You're putting literal newlines into the value of CFLAGS.  This is
> not supported.  Convert them to normal spaces first.

Actually I checked for that before my original post.  That issue does
not appear to be a concern (unless I am misunderstanding your comment)

After the above commands to form CFLAGS, try

echo -n $CFLAGS |od -a |less

No instances of "nl" appear.  Of course, if you drop the -n option,
one appears at the end, but that is echo's fault.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________



More information about the cmake-developers mailing list