jimporter / bfg9000

bfg9000 - build file generator
https://jimporter.github.io/bfg9000
BSD 3-Clause "New" or "Revised" License
76 stars 21 forks source link

Pass the configure-time environment vars to build steps? #126

Open jimporter opened 4 years ago

jimporter commented 4 years ago

To reduce potentially-confusing errors, maybe it'd make sense to use the environment vars as specified during configuration when running any build step (e.g. by creating a command like bfg9000 run and prepending that to every command in the build scripts).

This came up while working on caliber where I noticed that temporarily setting CXX during configuration results in the build forgetting about this by the time caliber actually runs, meaning that it's easy to accidentally miss testing a non-default compiler with caliber.

I'm not sure if this is something that should be fixed, or if the above suggestion is right. I'll have to think...

jimporter commented 3 years ago

Note: bfg9000 run now exists, so you can technically resolve this via bfg9000 run make <whatever>. Having it as the default might be nice though (or at least an option to make it work implicitly)...