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

Brad King brad.king at kitware.com
Mon Aug 1 15:01:06 EDT 2011


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.

-Brad



More information about the cmake-developers mailing list