Boost logo

Boost-Build :

Subject: Re: [Boost-build] Very slow Visual Studio 2012 builds
From: Juraj Ivanèiæ (juraj.ivancic_at_[hidden])
Date: 2014-03-20 18:53:16

On 20.3.2014. 22:35, tr1gun wrote:

> I tried the patch with the intel-win compiler as it calls the
> vcvars.bat file too.
> A little annoyance that i encountered with capturing the set variables,
> that they will be printed every time with option -d+2. Therefore it is
> quite hard to spot the important commands.
> Has anyone succeeded in putting all those set statements in a generated
> file? From the mails i haven't found a clue how this can be achieved.
> Any hints where i could look how to create a batch and make every target
> depend on it?

I find it pretty annoying as well, and have been thinking how to solve
that. I came up with 2 ideas, both requiring some tinkering with bjam/b2

1. Create a temporary batch file, as you suggested, which is practically
just a fast vcvarsall.bat alternative. The problem here is where to put
this file. It should not be a part of dependency resolution, should not
pollute build directories. Temp dir seems like a good place. Perhaps b2
could be extended with e.g. TMPFILE builtin. It already has temp file
logic implemented somewhere.

2. Somehow extend rule/actions so that the environment can be set
externally. For example:

rule compile ( )
     ENVIRONMENT on $(>) = A=Hello B=World ;

actions compile
     echo %A% %B%!

Environment set on target could be fed directly to CreateProcess or
execve. This would additionally allow a lot of actions to be executed
directly, avoiding shell

actions compile noshell
     cl.exe ...

Now that I think about it... I'd love to have both of these features
available :)


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at