[build2] Access to environment variables

Boris Kolpackov boris at codesynthesis.com
Fri Jun 23 08:09:37 UTC 2017


Moldmann Max (DC-MA/ENG52-NA) <Max.Moldmann at boschrexroth-us.com> writes:

> Is it possible to access environment variables in config.build?

If you get the latest staged[1] toolchain, then you can use the getenv()
function. For example:

print $getenv(PATH)

cxx.poptions += "-I$getenv(MY_HEADER_DIR)"

[1] https://stage.build2.org/0/

Boris



More information about the users mailing list