Seems that CPPPATH does not work
env = Environment()
target = 'app'
sources = ['app.d']
libs = ['phobos2', 'pthread', 'm', 'rt']
includes = ['/home/supertool/devel/d/vibe.d/source/vibe']
env.Program(target = target,
source = sources,
LIBS = libs,
CPPPATH = includes);
and when I run scons, it generates compile command:
dmd -I. -c -ofapp.o app.d
includes is not added into -I part
So how can I config this? Is there a INCLUDEPATH ?
Instead of using the
CPPPATHconstruction variable, for which SCons prepends the-I, you could try manually building the paths, like this:But this may lead to the same problem, that
CCFLAGSwont be used forDcompilation. I havent seen any D-specific construction variables other thanDSUFFIXESEDIT: Looks like
DFLAGSandDPATHare not documentedI was playing around with this on my machine and see that
CCFLAGSwont work forD, butDFLAGSandDPATHdo, and they’re not documented 🙁DPATHwill have"I"prepended at compile time, so it is analogous toCPPPATHThere has been talk on the SCons user mail list about beefing up the SCons D support.