There are a few ways that you can solve this issue:
- You can have each developer specify environment variables and those environment variables could be ready in by your SConscript using pythons os.environ method
- you can use scons Variables
- you can create a config file that is read in by the scons script.
For example since I see you are using gtest. If you want to specify the path to gtest you could write a script similar to this.
# build variables
vars = Variables()
vars.Add(EnumVariable('VARIANT', 'Build variant', 'debug', allowed_values('debug', 'release'))
vars.Add(PathVariable('GTEST_DIR', 'path to gtest', os.environ.get('GTEST_PATH'), PathVariable.PathIsDir))
## environment: macbook
macbook = Environment(variables = vars)
Help(vars.GenerateHelpText(macbook))
### include
macbook.Append(CPPPATH = ["/usr/local/Cellar/gcc48/4.8.1/gcc/include/c++/4.8.", \
"$GTEST_PATH/include", \
"/usr/local/Cellar/log4cxx/0.10.0/include"])
Now when you run SCons you add the build variable
scons GTEST_PATH=/Users/cls/workspace/gtest VARIANT=release
if you don't want to type that in every time you run you can specify the environment variable GTEST_PATH
or you can specify the SCONSFLAGS
environment variable.
using the scons variables helps because when you type scons -h
you will get a list of the current value of the variable and the help text.
If you would like you could create a config file that gets read in. I would checkout this post:
Scons (Build System) Variables : load config file with custom/unknown values