Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
scons script (from "Aberations in graphics" thread
02-27-2007, 11:30 AM,
#1
scons script (from "Aberations in graphics" thread
thelusiv Wrote:I checked something (r1561) in that sort of fixes this. Actually it's more of a trade-off. I set up an automatically generated header file "definitions.h" that now contains all the #define statements that used to be -D flags for the compiler. Now, fewer files have to be recompiled every time something changes in this file. It still is a lot...but it's not quite all of them. Let me know if you guys like this better than recompiling all the files every time a define changes.

I still find there is too much re-compile because of REVISION. So I did some searching in scons mailing archive. Here is what I've found,

http://scons.tigris.org/servlets/ReadMsg...msgNo=7893
Quote:And here's another, which may be more in line with what you were asking:

env=Environment(CPPVAR = '-flag2', CPPFLAGS = '-flag1 $CPPVAR -flag3'.split())
p = env.Program('foo',
['foo1.c',
env.Object('foo2.c', CPPVAR = '-flag4'),
'foo3.c'])

Foo2.c will be compiled with -flag4 instead of -flag2.
We can adopt the same method to add a -DREVISION="xxxx" when compiling main.cpp. This should avoid the excessive re-compile due to revision change.
Reply


Messages In This Thread
scons script (from "Aberations in graphics" thread - by rookie1 - 02-27-2007, 11:30 AM
[No subject] - by thelusiv - 02-28-2007, 02:00 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)