Boost logo

Boost-Build :

From: Alexey Pakhunov (alexeypa_at_[hidden])
Date: 2005-10-02 13:05:32


Reece Dunn wrote:
> vcvars.bat. I have tested it on versions 6.0, 7.1 and 8.0. I haven't
> tested with 7.0, but it should work.

7.0 and 7.1 use identical INCLUDE, LIB and PATH settings.

> * PlatformSDK is hardcoded. This could be moved into the
> msplatformsdk.jam file when this becomes available.

I guess we should rely on order of the include directories. It will more
or less replicate normal VS + PSDK setup.

> Also, this would
> need to be revised for PocketPC/SmartPhone compilations (i.e. embedded
> VC++ and 8.0 when targetting WinCE platforms).

Good point.

> * This hasn't been tested with standalone targets such as the 7.1
> toolkit, embedded VC++ and the compilers in the PlatformSDK distributions.

7.1 toolkit paths:

Set PATH=C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin;%PATH%
Set INCLUDE=C:\Program Files\Microsoft Visual C++ Toolkit
2003\include;%INCLUDE%
Set LIB=C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;%LIB%

> * There should really be a path flag/variable associated with each
> toolset+version, that updates the environment variable when an action is
> being called (this should be generic for any environment variable, e.g.
>
> set-env PATH : $(root)/bin;$(PATH) ;

Do you mean that the 'init' rule will prepare commands for setting up
the environment and then each block of actions will execute prepared
commands? Or something else?

> feature $(condition) : <include>$(root)/include ;

Order-sensitive features should be implemented first. :-)

> + if [ MATCH ^(6\\.) : $(version) ] # VC 6.0
> + {
> + path = $(root)/../Common/MSDev98/bin ;
> + path = $(path);$(root)/bin ;
> + path = $(path);$(root)/../Common/WinNT ;
> + path = $(path);$(root)/../Common/Tools ;
> + }
> + else # VC 7.0 and above
> + {
> + path = $(root)/../Common7/IDE ;
> + path = $(path);$(root)/bin ;
> + path = $(path);$(root)/../Common7/Tools ;
> + path = $(path);$(root)/../Common7/Tools/bin/prerelease ;
> + path = $(path);$(root)/../Common7/Tools/bin ;
> + }

We are going to have 5 different variants of these settings once amd64
and ia64 support will be added. I guess we need some generic code that
will construct paths by a given version number and target CPU.

Another issue - cygwin. We should use path.join and other path rules to
construct proper paths. There is also the
'common.prepend-path-variable-command' rule allowing to construct proper
'set PATH' command for both NT and CYGWIN.

> + setup = "set PATH="$(path)";%PATH%" ;
> + if [ os.name ] = NT
> + {
> + setup = $(setup)"
> +" ;
> + }
> + else
> + {
> + setup = "cmd /S /C "$(setup)" \"&&\" " ;
> + }

We don't need this trick any more.

setup = [ common.prepend-path-variable-command PATH : ... ] ;
flags msvc.compile SETUP $(condition) : $(setup) ;

actions ...
{
$(SETUP)
cl.exe ... # Note: no prefix
}

> + # prefix with setup, or quoted path if any
> + local prefix = $(setup) ;
> + flags msvc.compile .CC $(condition) : $(prefix)$(compiler) ;

Now we can get rid of gluing '$(prefix)$(compiler)' if the separate
setup command is used as I showed above.

> + if [ MATCH ^(6\\.) : $(version) ] # VC 6.0
> + {
> + flags msvc.compile CFLAGS $(condition) : "-I\"$(root)/atl/include\"" ;

[skip]

> + flags msvc LINKFLAGS $(condition) : "-LIBPATH:\"$(root)/PlatformSDK/lib\"" ;

The same comment - some kind of generic code needed.

Best regards/Venlig hilsen,
Alexey Pakhunov.

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk