Subject: [Boost-build] Setting up MSVC toolset to work with WinSDK v6.1
From: Alexey Pakhunov (alexeypa_at_[hidden])
Date: 2009-04-05 02:46:12
I just wanted to share an example of user-config.jam that makes MSVC toolset
to use the standard WinSDK environment.
---- user-config.jam ----
import modules : poke ;
import path : join ;
# Helper scripts are used to pass parameters to SetEnv.cmd
local profile = [ modules.binding user-config ] ;
local setup-x86 = [ path.join $(profile:P) wdk_x86.cmd ] ;
local setup-x64 = [ path.join $(profile:P) wdk_x64.cmd ] ;
local setup-ia64 = [ path.join $(profile:P) wdk_ia64.cmd ] ;
# SetEnv.cmd requires CMD extensions to work
modules.poke msvc : JAMSHELL : cmd.exe /E:ON /V:ON /Q /C % ;
---- wdk_x86.cmd ----
call D:\WinSDK\v6.1\Bin\SetEnv.Cmd /x86
---- wdk_x64.cmd ----
call D:\WinSDK\v6.1\Bin\SetEnv.Cmd /x64
---- wdk_ia64.cmd ----
call D:\WinSDK\v6.1\Bin\SetEnv.Cmd /ia64
Sure you need to use your own path to the SDK in the helper scripts.
PS: It took quite a while to get it working. I must say that configuration
rules from MSVC toolset got out of hand. They need to be refactored so that
it will be possible to setup architecture (x86, x64 and ia64) independently.
Also calling a setup script per each rule does not seem to be very
efficient. Maybe it can be optimized by executing the setup script once and
capturing environment differences.
-- Best regards, 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