2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-17 13:42:14 +00:00

Allow the use of an unconfigured msvc as long as the PATH, etc., are set up.

[SVN r17524]
This commit is contained in:
Dave Abrahams
2003-02-19 10:23:03 +00:00
parent b5b9931295
commit 57d49df2ca
4 changed files with 32 additions and 12 deletions

View File

@@ -84,10 +84,13 @@ rule init ( version ? path ? : vendor ? : setup ? compiler ? linker ? )
compiler ?= cl ;
linker ?= link ;
flags msvc.compile CC $(condition) : $(prefix)$(compiler) ;
flags msvc.link LD $(condition) : $(prefix)$(linker) ;
flags msvc.compile .CC $(condition) : $(prefix)$(compiler) ;
flags msvc.link .LD $(condition) : $(prefix)$(linker) ;
}
.CC = cl ;
.LD = link ;
# Declare generators
# is it possible to combine these?
@@ -131,7 +134,7 @@ flags msvc.compile INCLUDES <include> ;
actions compile
{
$(CC) /Zm800 -nologo -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(USER_CFLAGS) -I"$(INCLUDES)" -c -Fo"$(<)" "$(>)"
$(.CC) /Zm800 -nologo -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(USER_CFLAGS) -I"$(INCLUDES)" -c -Fo"$(<)" "$(>)"
}
# Declare flags and action for linking
@@ -157,12 +160,12 @@ toolset.flags msvc.link FINDLIBS <find-static-library> <find-shared-library> ;
actions link
{
$(LD) /nologo $(NOINCREMENTAL) $(LINKFLAGS) /out:"$(<[1])" /IMPLIB:"$(<[2])" /LIBPATH:"$(LINKPATH)" "$(FINDLIBS:S=.lib)" @"$(>)"
$(.LD) /nologo $(NOINCREMENTAL) $(LINKFLAGS) /out:"$(<[1])" /IMPLIB:"$(<[2])" /LIBPATH:"$(LINKPATH)" "$(FINDLIBS:S=.lib)" @"$(>)"
}
# Declare action for creating static libraries
actions archive
{
if exist "$(<)" set _$(<:B)_="$(<)"
$(LD) /nologo /lib /out:"$(<)" %_$(<:B)_% @"$(>)"
$(.LD) /nologo /lib /out:"$(<)" %_$(<:B)_% @"$(>)"
}

View File

@@ -185,7 +185,14 @@ rule set-target-variables ( rule-or-module target : properties * )
}
}
$(variable) on $(target) += $(result) ;
# Without this test, the assignment below would create a
# target variable even if $(result) is empty. That is
# undesirable because the empty target variable would mask
# module globals intended to be used as defaults.
if ! $(result)-is-nonempty
{
$(variable) on $(target) += $(result) ;
}
}
# recurse for any module-specific flags

View File

@@ -185,7 +185,14 @@ rule set-target-variables ( rule-or-module target : properties * )
}
}
$(variable) on $(target) += $(result) ;
# Without this test, the assignment below would create a
# target variable even if $(result) is empty. That is
# undesirable because the empty target variable would mask
# module globals intended to be used as defaults.
if ! $(result)-is-nonempty
{
$(variable) on $(target) += $(result) ;
}
}
# recurse for any module-specific flags

View File

@@ -84,10 +84,13 @@ rule init ( version ? path ? : vendor ? : setup ? compiler ? linker ? )
compiler ?= cl ;
linker ?= link ;
flags msvc.compile CC $(condition) : $(prefix)$(compiler) ;
flags msvc.link LD $(condition) : $(prefix)$(linker) ;
flags msvc.compile .CC $(condition) : $(prefix)$(compiler) ;
flags msvc.link .LD $(condition) : $(prefix)$(linker) ;
}
.CC = cl ;
.LD = link ;
# Declare generators
# is it possible to combine these?
@@ -131,7 +134,7 @@ flags msvc.compile INCLUDES <include> ;
actions compile
{
$(CC) /Zm800 -nologo -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(USER_CFLAGS) -I"$(INCLUDES)" -c -Fo"$(<)" "$(>)"
$(.CC) /Zm800 -nologo -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(USER_CFLAGS) -I"$(INCLUDES)" -c -Fo"$(<)" "$(>)"
}
# Declare flags and action for linking
@@ -157,12 +160,12 @@ toolset.flags msvc.link FINDLIBS <find-static-library> <find-shared-library> ;
actions link
{
$(LD) /nologo $(NOINCREMENTAL) $(LINKFLAGS) /out:"$(<[1])" /IMPLIB:"$(<[2])" /LIBPATH:"$(LINKPATH)" "$(FINDLIBS:S=.lib)" @"$(>)"
$(.LD) /nologo $(NOINCREMENTAL) $(LINKFLAGS) /out:"$(<[1])" /IMPLIB:"$(<[2])" /LIBPATH:"$(LINKPATH)" "$(FINDLIBS:S=.lib)" @"$(>)"
}
# Declare action for creating static libraries
actions archive
{
if exist "$(<)" set _$(<:B)_="$(<)"
$(LD) /nologo /lib /out:"$(<)" %_$(<:B)_% @"$(>)"
$(.LD) /nologo /lib /out:"$(<)" %_$(<:B)_% @"$(>)"
}