[Vm-dev] cmake, unix builds and adding a #define at configure time

tim Rowledge tim at rowledge.org
Fri Jun 7 23:06:25 UTC 2013


I've been having *ever* so much fun trying to make the unix vm with the fast bitblt enabled. You might have thought there were unusual numbers of earthquakes recently, but that was actually me banging my head against the walls. 

To build the vm on unix one runs the cmake configure & make programs. They do many magical things and create dozens if not hundreds of files, spend much time doing arcane incantations and eventually pop out a vm. Then, because unix is braindead about handling programs with required libraries and external components (despite the fact that this problem has been solved, without nasty 'resource forks', since *1989*) you have to 'install' with yet another cmake incantation.

I need to be able to build two versions of the vm for experimenting - one with the fast blt enabled and the other, not. Since I hadn't come across cmake and its world of annoyance previously I simply took at face value the advice I got to run cmake/configure --CFLAGS='-DENABLE_FAST_BLT' for the build directory where I wanted the fast blt. Some annoying times later I eventually discover that the reason the fast bitblt appeared to massively slow down everything wasn't in fact that it had terrible bugs but that said configure option *over rides* the normal cflags and therefore my vms weren't even slightly optimised. Sigh.

So my question is - aside from "why!!!!!" - how, if indeed it is possible at all, does one add a -D flag when doing the cmake/configure setup for a build directory? I've tried a few things, attempted to make sense of what doc I can find and not had any pleasure.  Over to you folks. Help me moldy wank inobee, you're my only dope.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
10.0 times 0.1 is hardly ever 1.0.




More information about the Vm-dev mailing list