gsf
gsf

Reputation: 7252

replace the compiler in boost build v2

I would like to hook a compiler tool in the boost build.

Note that I do not want to replace the compiler, that is easy:

using msvc : : : <compiler>mycompiler ;

What I am looking for is my tool to be literally placed in front of the execution line. Something similar to the unit-test launcher option.

using msvc : : : <compiler-launcher>launcher ;

to result in

launcher <the original line here>

Ideas how I can do that hopefully without need to change the existing code.

Upvotes: 1

Views: 78

Answers (1)

Juraj Ivančić
Juraj Ivančić

Reputation: 725

I think this there is currently no support for this, so you are stuck with the <compiler> option. I can think of two possible ways to accomplish this:

  1. Try setting the compiler to <compiler>"launcher cl" or
  2. Create a batch file which would create the appropriate command line and then use it as a <compiler>cl_wrapper.bat

    That batch file could look something like this:

    cl_wrapper.bat

    @launcher cl.exe %*

Upvotes: 1

Related Questions