Boost logo

Boost-Build :

From: Kirill Lapshin (gclbb-jamboost_at_[hidden])
Date: 2003-06-28 13:58:33


Hi All,

Attached please find a patch to M4 version of msvc.jam. The purpose of
the patch is to improve automatic compiler detection.

1. For all version use %ProgramFiles% environment variable, rather then
c:\Progam Files. This will cover at least two cases - windows installed
on other drive then C:, and localized windows version, which tend to
name "Program Files" according to local language.

2. If VS71COMTTOOLS variable present use it to determine MSVC 7.1
location. This environment variable is the only variable set by the MSVC
7.1 installer. This particular patch should make automatic detection of
7.1 version 99% percent reliable. The only way to break it is manually
change or remove env variable set by installer.

While we are at it, I have a question on msvc toolset. It works fine
under cmd.exe but under cygwin it fails to print any error messages. It
invokes compiler jsut fine, but any messages spit out by compiler are
lost. Any ideas?

--Kirill
 --------------020806010200010407010306 Content-Type: text/plain;
name="msvc.jam.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="msvc.jam.diff"

--- D:\work\msvc.jam 2003-06-16 08:21:49.000000000 -0400
+++ D:\work\quanti\boost-build\tools\msvc.jam 2003-06-28 14:47:02.000000000 -0400
@@ -146,10 +146,31 @@
# We know default locations only for msvc, not for alternative vendors
if ! $(vendor)
{
- local version-6-path = "c:\\Program Files\\Microsoft Visual Studio\\VC98" ;
- local version-7-path = "c:\\Program Files\\Microsoft Visual Studio .NET\\VC7" ;
+ local ProgramFiles = [ modules.peek : ProgramFiles ] ;
+ if $(ProgramFiles)
+ {
+ ProgramFiles = "$(ProgramFiles:J= )" ;
+ }
+ else
+ {
+ ProgramFiles = "c:\\Program Files" ;
+ }
+
+ local version-6-path = $(ProgramFiles)"\\Microsoft Visual Studio\\VC98" ;
+ local version-7-path = $(ProgramFiles)"\\Microsoft Visual Studio .NET\\VC7" ;
local version-7.0-path = $(version-7-path) ;
- local version-7.1-path = "c:\\Program Files\\Microsoft Visual Studio .NET 2003\\VC7" ;
+ local version-7.1-path = $(ProgramFiles)"\\Microsoft Visual Studio .NET 2003\\VC7" ;
+
+ local VS71COMNTOOLS = [ modules.peek : VS71COMNTOOLS ] ;
+ if $(VS71COMNTOOLS)
+ {
+ # VS71COMNTOOLS is set by VS .NET 2003 to <VSDIR>\Common7\Tools
+ version-7.1-path = [ path.make "$(VS71COMNTOOLS:J= )" ] ;
+ version-7.1-path = [ path.parent $(version-7.1-path) ] ;
+ version-7.1-path = [ path.parent $(version-7.1-path) ] ;
+ version-7.1-path = [ path.join $(version-7.1-path) "VC7" ] ;
+ version-7.1-path = [ path.native $(version-7.1-path) ] ;
+ }

if $(version)
{
 --------------020806010200010407010306--


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