I noticed if you 
mkdir bld
cd bld
../platforms/unix/cmake/configure --CFLAGS="-foo" 

-- Setting CFLAGS=-foo
-- Using CFLAGS -g -fomit-frame-pointer -O2

make -n 
confirms that the CFLAGS used for gcc is the "-g -fomit-frame-pointer -O2" not the -foo you asked for. 

Now if you toss chicken entrails about you might get 
-- Setting CFLAGS=-fum 
-- Setting CFLAGS=-foo
---Setting -g -fomit-frame-pointer -O2
--Using CFLAGS -fum 

Or you repeat the 
../platforms/unix/cmake/configure --CFLAGS="-foo" 
a couple of times, then it takes well maybe... 

Or various hand waving of CFLAGS=
rm CMakeCache.txt

maybe some can explain the magic, or fix the script? 

--
===========================================================================
John M. McIntosh <johnmci@smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================