mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-30 19:29:52 +02:00
Add CPPDEFINES to the compile command
This commit is contained in:
@@ -237,7 +237,7 @@ if(GetOption('everythingAtOnce')):
|
|||||||
env.Command(['generated/ElementClasses.cpp', 'generated/ElementClasses.h'], Glob('src/simulation/elements/*.cpp'), "python generator.py elements $TARGETS $SOURCES")
|
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.Command(['generated/ToolClasses.cpp', 'generated/ToolClasses.h'], Glob('src/simulation/tools/*.cpp'), "python generator.py tools $TARGETS $SOURCES")
|
||||||
env.Decider('MD5')
|
env.Decider('MD5')
|
||||||
t=env.Program(target=programName, source=sources)
|
t=env.MFProgram(target=programName, source=sources)
|
||||||
Default(t)
|
Default(t)
|
||||||
else:
|
else:
|
||||||
env.Command(['generated/ElementClasses.cpp', 'generated/ElementClasses.h'], Glob('src/simulation/elements/*.cpp'), "python generator.py elements $TARGETS $SOURCES")
|
env.Command(['generated/ElementClasses.cpp', 'generated/ElementClasses.h'], Glob('src/simulation/elements/*.cpp'), "python generator.py elements $TARGETS $SOURCES")
|
||||||
|
@@ -203,8 +203,13 @@ def MFProgramGenerator(source, target, env, for_signature):
|
|||||||
#else:
|
#else:
|
||||||
# _CPPPATH.append(relpath(os.path.join(sconscript_dir, i),
|
# _CPPPATH.append(relpath(os.path.join(sconscript_dir, i),
|
||||||
# destdir))
|
# destdir))
|
||||||
|
|
||||||
|
defines = ""
|
||||||
|
for t in env['CPPDEFINES']:
|
||||||
|
defines += ("-D"+str(t)+" ")
|
||||||
|
|
||||||
_CPPINCFLAGS = ['-I' + i for i in _CPPPATH]
|
_CPPINCFLAGS = ['-I' + i for i in _CPPPATH]
|
||||||
_CCOMCOM = '$CPPFLAGS $_CPPDEFFLAGS %s' % ' '.join(_CPPINCFLAGS)
|
_CCOMCOM = '$CPPFLAGS $_CPPDEFFLAGS $defines %s' % ' '.join(_CPPINCFLAGS)
|
||||||
|
|
||||||
libstr = ""
|
libstr = ""
|
||||||
for t in env['LIBS']:
|
for t in env['LIBS']:
|
||||||
|
Reference in New Issue
Block a user