Configuring Boost.Build V2 to use msvc-8.0 toolset

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Configuring Boost.Build V2 to use msvc-8.0 toolset

Daniel Einspanjer
I am trying to put together a presentation for our development team to switch from make to Boost.Build V2.  I've been stumbling through the documentation and trying to search the archives of this mailing list (using Google queries with site: lists.boost.org) for answers to problems and concerns I have, but it has been slow going.

I'm working with:
Boost.Build V2 (Milestone 10)
Boost.Jam 03.01.11

My first question I'd like to put to the list is regarding the msvc toolset.
Is it required to set up the msvc 8 environment before running bjam? Looking at the msvc.jam code and the references to toolkit configuration in the docs, it seems to me that bjam is supposed to be able to find msvc installations that follow standard installation paths.

In my sandbox, I have msvc 8 installed, and if I open up a command prompt, I need to run %VS80COMNTOOLS%vsvars32.bat first.

In my boost-build root, I have a user-config.jam that declares "using msvc ;".

If I try to run bjam before running vsvars32.bat, I get the following output:
  [C:\src\test]bjam
  warning: toolset msvc initialization: can't find tool cl.exe
  warning: initialized from c:/bin/buildtools/boost-jam\user- config.jam:29
  ...found 32 targets...
  ...updating 4 targets...
  msvc.compile.c++ bin\msvc\debug\test.obj
  '/Zm800' is not recognized as an internal or external command,
  operable program or batch file.
     /Zm800 -nologo -TP   /Z7 /Od /Ob0 /EHsc /GR /MDd    -c -Fo"bin\msvc\debug\test.obj"  "test.cpp"

If I run bjam after vsvars32.bat then I get:
  [C:\src\test]vs
  Setting environment for using Microsoft Visual Studio 2005 x86 tools.
  [C:\src\test]bjam
  ...found 32 targets...
  ...updating 4 targets...
  msvc.compile.c++ bin\msvc\debug\test.obj
  test.cpp
      call "c:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat" > nul
  cl  /Zm800 -nologo -TP   /Z7 /Od /Ob0 /EHsc /GR /MDd    -c -Fo"bin\msvc\debug\test.obj"  "test.cpp"

I've been trying to reverse engineer the msvc.jam toolkit to understand how it looks for stuff, and as near as I can tell, it looks for cl.exe in the path.  If it finds it then it will call vcvars32.bat before ever invocation of cl.exe.

That just seems a bit strange to me.  Is there any further documentation on how bjam is supposed to behave with determining toolset locations?

Daniel Einspanjer

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Configuring Boost.Build V2 to use msvc-8.0 toolset

Alexey Pakhunov
Daniel Einspanjer wrote:
> in the docs, it seems to me that bjam is supposed to be able to find
> msvc installations that follow standard installation paths.

CVS HEAD version definitely does it. I'm not sure about Milestone 10.

> In my boost-build root, I have a user-config.jam that declares "using
> msvc ;".

Try using msvc : 8.0 : "<full path to cl.exe>" ;

> That just seems a bit strange to me.  Is there any further documentation
> on how bjam is supposed to behave with determining toolset locations?

http://www.boost.org/doc/html/bbv2/advanced.html#bbv2.advanced.configuration

Best regards/Venlig hilsen,
   Alexey Pakhunov.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Configuring Boost.Build V2 to use msvc-8.0 toolset

Daniel Einspanjer
In reply to this post by Daniel Einspanjer
I just got a copy of Boost.Build V2 from CVS HEAD and the msvc 8 toolkit is
now properly autodetected.

Sorry for the bother.

Daniel

"Daniel Einspanjer" <[hidden email]> wrote in message
news:[hidden email]...
I am trying to put together a presentation for our development team to
switch from make to Boost.Build V2.  I've been stumbling through the
documentation and trying to search the archives of this mailing list (using
Google queries with site: lists.boost.org) for answers to problems and
concerns I have, but it has been slow going.

I'm working with:
Boost.Build V2 (Milestone 10)
Boost.Jam 03.01.11

My first question I'd like to put to the list is regarding the msvc toolset.
Is it required to set up the msvc 8 environment before running bjam? Looking
at the msvc.jam code and the references to toolkit configuration in the
docs, it seems to me that bjam is supposed to be able to find msvc
installations that follow standard installation paths.

In my sandbox, I have msvc 8 installed, and if I open up a command prompt, I
need to run %VS80COMNTOOLS%vsvars32.bat first.

In my boost-build root, I have a user-config.jam that declares "using msvc
;".

If I try to run bjam before running vsvars32.bat, I get the following
output:
  [C:\src\test]bjam
  warning: toolset msvc initialization: can't find tool cl.exe
  warning: initialized from c:/bin/buildtools/boost-jam\user- config.jam:29
  ...found 32 targets...
  ...updating 4 targets...
  msvc.compile.c++ bin\msvc\debug\test.obj
  '/Zm800' is not recognized as an internal or external command,
  operable program or batch file.
     /Zm800 -nologo -TP   /Z7 /Od /Ob0 /EHsc /GR
/MDd    -c -Fo"bin\msvc\debug\test.obj"  "test.cpp"

If I run bjam after vsvars32.bat then I get:
  [C:\src\test]vs
  Setting environment for using Microsoft Visual Studio 2005 x86 tools.
  [C:\src\test]bjam
  ...found 32 targets...
  ...updating 4 targets...
  msvc.compile.c++ bin\msvc\debug\test.obj
  test.cpp
      call "c:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
 > nul
  cl  /Zm800 -nologo -TP   /Z7 /Od /Ob0 /EHsc /GR
/MDd    -c -Fo"bin\msvc\debug\test.obj"  "test.cpp"

I've been trying to reverse engineer the msvc.jam toolkit to understand how
it looks for stuff, and as near as I can tell, it looks for cl.exe in the
path.  If it finds it then it will call vcvars32.bat before ever invocation
of cl.exe.

That just seems a bit strange to me.  Is there any further documentation on
how bjam is supposed to behave with determining toolset locations?

Daniel Einspanjer




_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost-build 



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Configuring Boost.Build V2 to use msvc-8.0 toolset

Daniel Einspanjer
In reply to this post by Alexey Pakhunov
I just got a copy of Boost.Build V2 from CVS HEAD and the msvc 8 toolkit is
now properly autodetected.

Sorry for the bother.

Daniel

----- Original Message -----
From: "Alexey Pakhunov" <[hidden email]>
Newsgroups: gmane.comp.lib.boost.build
Sent: Tuesday, January 31, 2006 1:26 PM
Subject: Re: Configuring Boost.Build V2 to use msvc-8.0 toolset


> Daniel Einspanjer wrote:
>> in the docs, it seems to me that bjam is supposed to be able to find
>> msvc installations that follow standard installation paths.
>
> CVS HEAD version definitely does it. I'm not sure about Milestone 10.
>
>> In my boost-build root, I have a user-config.jam that declares "using
>> msvc ;".
>
> Try using msvc : 8.0 : "<full path to cl.exe>" ;
>
>> That just seems a bit strange to me.  Is there any further documentation
>> on how bjam is supposed to behave with determining toolset locations?
>
> http://www.boost.org/doc/html/bbv2/advanced.html#bbv2.advanced.configuration
>
> Best regards/Venlig hilsen,
>   Alexey Pakhunov.
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost-build
>

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build