What's the correct way of using scons with distcc? The obvious way of using CC="distcc g++" or CXX doesn't work.

Did anyone ever succeed in combining the two?

Thanks!

有帮助吗?

解决方案

Have you configured CC or CXX via an environment variable? SCons doesn't pollute its default environment with variables from the calling environment. However, you may initialize the SCons environment from the OS environment (or preferably a subset of it):

import os
env = Environment(ENV = os.environ)
env.Program('yourprogram.cpp')

Alternatively, this could also work (haven't used SCons in a long time):

env = Environment(CXX='distcc g++')
env.Program('yourprogram.cpp')

Have a look at the man page for an overview of all the variables used in SCons.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top