[Vm-dev] issue with cmake

David T. Lewis lewis at mail.msen.com
Fri Jan 22 11:47:54 UTC 2010


On Thu, Jan 21, 2010 at 07:52:12PM -0800, John McIntosh wrote:
>  
> 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?

I definitely can't explain the magic, but I've found that if I
delete the entire contents of my build directory, then start
fresh with configure, then the chicken entrails usually become
better aligned.

FWIW, I'm also in the habit of using this directory structure:

./platforms
./src32
./src64
./build32
./build64

Then from an empty build64 directory, I run configure with a
command line such as:

../platforms/unix/cmake/configure --src=../src64 --without-gl --CFLAGS=' -g -m64'

Dave



More information about the Vm-dev mailing list