Remove Precompiled header stuff as it breaks scons for some reason
This commit is contained in:
parent
6d991c10d7
commit
c9caade1c3
39
SConscript
39
SConscript
@ -55,9 +55,9 @@ if((not GetOption('lin')) and (not GetOption('win')) and (not GetOption('macosx'
|
|||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
|
|
||||||
if(GetOption('win')):
|
if(GetOption('win')):
|
||||||
env = Environment(tools = ['mingw', 'gch', 'mfprogram'], ENV = os.environ)
|
env = Environment(tools = ['mingw'], ENV = os.environ)
|
||||||
else:
|
else:
|
||||||
env = Environment(tools = ['default', 'gch', 'mfprogram'], ENV = os.environ)
|
env = Environment(tools = ['default'], ENV = os.environ)
|
||||||
|
|
||||||
if GetOption("toolprefix"):
|
if GetOption("toolprefix"):
|
||||||
env['CC'] = GetOption("toolprefix")+env['CC']
|
env['CC'] = GetOption("toolprefix")+env['CC']
|
||||||
@ -167,11 +167,14 @@ elif(GetOption('snapshot') or GetOption('snapshot-id')):
|
|||||||
env.Append(CPPDEFINES='SNAPSHOT')
|
env.Append(CPPDEFINES='SNAPSHOT')
|
||||||
|
|
||||||
if(GetOption('save-version')):
|
if(GetOption('save-version')):
|
||||||
env.Append(CPPDEFINES=['SAVE_VERSION=' + GetOption('major-version')])
|
env.Append(CPPDEFINES=['SAVE_VERSION=' + GetOption('save-version')])
|
||||||
|
|
||||||
if(GetOption('minor-version')):
|
if(GetOption('minor-version')):
|
||||||
env.Append(CPPDEFINES=['MINOR_VERSION=' + GetOption('minor-version')])
|
env.Append(CPPDEFINES=['MINOR_VERSION=' + GetOption('minor-version')])
|
||||||
|
|
||||||
|
if(GetOption('build-number')):
|
||||||
|
env.Append(CPPDEFINES=['BUILD_NUM=' + GetOption('build-number')])
|
||||||
|
|
||||||
if(GetOption('x86')):
|
if(GetOption('x86')):
|
||||||
env.Append(CPPDEFINES='X86')
|
env.Append(CPPDEFINES='X86')
|
||||||
|
|
||||||
@ -210,10 +213,8 @@ sources+=Glob("src/simulation/tools/*.cpp")
|
|||||||
sources+=Glob("generated/ToolClasses.cpp")
|
sources+=Glob("generated/ToolClasses.cpp")
|
||||||
sources+=Glob("generated/ElementClasses.cpp")
|
sources+=Glob("generated/ElementClasses.cpp")
|
||||||
|
|
||||||
env['Gch'] = env.Gch('src/simulation/Tools.h.gch', 'src/simulation/Tools.h')[0]
|
if(GetOption('win')):
|
||||||
env['Gch'] = env.Gch('src/simulation/Elements.h.gch', 'src/simulation/Elements.h')[0]
|
sources = filter(lambda source: str(source) != 'src/simulation/Gravity.cpp', sources)
|
||||||
env['Gch'] = env.Gch('src/client/Client.h.gch', 'src/client/Client.h')[0]
|
|
||||||
env['Gch'] = env.Gch('src/simulation/SimulationData.h.gch', 'src/simulation/SimulationData.h')[0]
|
|
||||||
|
|
||||||
SetupSpawn(env)
|
SetupSpawn(env)
|
||||||
|
|
||||||
@ -237,19 +238,13 @@ if(GetOption('win')):
|
|||||||
if(GetOption('release')):
|
if(GetOption('release')):
|
||||||
env.Append(CCFLAGS=['-O3', '-ftree-vectorize', '-funsafe-math-optimizations', '-ffast-math', '-fomit-frame-pointer', '-funsafe-loop-optimizations', '-Wunsafe-loop-optimizations'])
|
env.Append(CCFLAGS=['-O3', '-ftree-vectorize', '-funsafe-math-optimizations', '-ffast-math', '-fomit-frame-pointer', '-funsafe-loop-optimizations', '-Wunsafe-loop-optimizations'])
|
||||||
|
|
||||||
if(GetOption('everythingAtOnce')):
|
if(GetOption('win')):
|
||||||
env.Command(['generated/ElementClasses.cpp', 'generated/ElementClasses.h'], Glob('src/simulation/elements/*.cpp'), "python generator.py elements $TARGETS $SOURCES")
|
envCopy = env.Clone()
|
||||||
env.Command(['generated/ToolClasses.cpp', 'generated/ToolClasses.h'], Glob('src/simulation/tools/*.cpp'), "python generator.py tools $TARGETS $SOURCES")
|
envCopy.Append(CCFLAGS=['-mincoming-stack-boundary=2'])
|
||||||
env.Decider('MD5')
|
sources+=envCopy.Object('src/simulation/Gravity.cpp')
|
||||||
t=env.MFProgram(target=programName, source=sources)
|
|
||||||
Default(t)
|
|
||||||
else:
|
|
||||||
env.Command(['generated/ElementClasses.cpp', 'generated/ElementClasses.h'], Glob('src/simulation/elements/*.cpp'), "python generator.py elements $TARGETS $SOURCES")
|
|
||||||
env.Command(['generated/ToolClasses.cpp', 'generated/ToolClasses.h'], Glob('src/simulation/tools/*.cpp'), "python generator.py tools $TARGETS $SOURCES")
|
|
||||||
env.Decider('MD5')
|
|
||||||
t=env.Program(target=programName, source=sources)
|
|
||||||
Default(t)
|
|
||||||
|
|
||||||
#if(GetOption('release')):
|
|
||||||
# StripExecutable(t);
|
|
||||||
|
|
||||||
|
env.Command(['generated/ElementClasses.cpp', 'generated/ElementClasses.h'], Glob('src/simulation/elements/*.cpp'), "python generator.py elements $TARGETS $SOURCES")
|
||||||
|
env.Command(['generated/ToolClasses.cpp', 'generated/ToolClasses.h'], Glob('src/simulation/tools/*.cpp'), "python generator.py tools $TARGETS $SOURCES")
|
||||||
|
env.Decider('MD5')
|
||||||
|
t=env.Program(target=programName, source=sources)
|
||||||
|
Default(t)
|
Reference in New Issue
Block a user