mirror of
https://github.com/boostorg/build.git
synced 2026-02-13 00:12:11 +00:00
Merge remote-tracking branch 'origin/develop' into feature/new-doc-format
This commit is contained in:
@@ -276,6 +276,10 @@ rule try-find-build ( ps : what : * )
|
||||
local x = [ PAD " - $(what)" : $(.width) ] ;
|
||||
for local i in $(args)
|
||||
{
|
||||
if ! $($(i)[1])
|
||||
{
|
||||
break ;
|
||||
}
|
||||
local jam-targets ;
|
||||
for local t in $($(i)[2-])
|
||||
{
|
||||
@@ -291,6 +295,7 @@ rule try-find-build ( ps : what : * )
|
||||
}
|
||||
if ! $(result)
|
||||
{
|
||||
log-check-result "$(x) : none" ;
|
||||
result = none ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,9 +234,21 @@ local rule configure-really ( version ? : command * : options * : compatibility
|
||||
local setup-call ;
|
||||
if $(major) >= 12
|
||||
{
|
||||
local t = [ msvc.maybe-rewrite-setup intel-win : "\"$(setup)\"" : "$(c) $(iclvars_vs_arg)" : $(version) : $(rewrite-setupscript) ] ;
|
||||
setup-call = "call $(t) > nul " ;
|
||||
cpu-conditions = $(condition)/$(.cpu-arch-$(c)) ;
|
||||
|
||||
if ! $(setup)
|
||||
{
|
||||
# No setup script
|
||||
}
|
||||
else if $(rewrite-setupscript) = off || [ os.name ] != NT
|
||||
{
|
||||
setup-call = "call \"$(setup)\" $(c) $(iclvars_vs_arg)" ;
|
||||
}
|
||||
else
|
||||
{
|
||||
toolset.flags intel-win .SETUP-SCRIPT $(cpu-conditions) : $(setup) ;
|
||||
toolset.flags intel-win .SETUP-OPTIONS $(cpu-conditions) : "$(c) $(iclvars_vs_arg)" ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -244,15 +256,17 @@ local rule configure-really ( version ? : command * : options * : compatibility
|
||||
cpu-conditions = $(condition) ;
|
||||
}
|
||||
|
||||
|
||||
if [ os.name ] = NT
|
||||
if $(setup-call)
|
||||
{
|
||||
setup-call = $(setup-call)"
|
||||
" ;
|
||||
}
|
||||
else
|
||||
{
|
||||
setup-call = "cmd /S /C "$(setup-call)" \"&&\" " ;
|
||||
if [ os.name ] = NT
|
||||
{
|
||||
setup-call = $(setup-call)"\n " ;
|
||||
}
|
||||
else
|
||||
{
|
||||
setup-call = "cmd /S /C "$(setup-call)" \"&&\" " ;
|
||||
}
|
||||
toolset.flags intel-win .SETUP $(cpu-conditions) : $(setup-call) ;
|
||||
}
|
||||
|
||||
if $(.debug-configuration)
|
||||
@@ -266,13 +280,13 @@ local rule configure-really ( version ? : command * : options * : compatibility
|
||||
local cpu-assembler = $(assembler) ;
|
||||
cpu-assembler ?= $(default-assembler-$(c)) ;
|
||||
|
||||
toolset.flags intel-win.compile .CC $(cpu-conditions) : $(setup-call)icl ;
|
||||
toolset.flags intel-win.link .LD $(cpu-conditions) : $(setup-call)xilink /nologo ;
|
||||
toolset.flags intel-win.archive .LD $(cpu-conditions) : $(setup-call)xilink /lib /nologo ;
|
||||
toolset.flags intel-win.link .MT $(cpu-conditions) : $(setup-call)mt -nologo ;
|
||||
toolset.flags intel-win.compile .ASM $(cpu-conditions) : $(setup-call)$(cpu-assembler) -nologo ;
|
||||
toolset.flags intel-win.compile .MC $(cpu-conditions) : $(setup-call)mc ;
|
||||
toolset.flags intel-win.compile .RC $(cpu-conditions) : $(setup-call)rc ;
|
||||
toolset.flags intel-win.compile .CC $(cpu-conditions) : icl ;
|
||||
toolset.flags intel-win.link .LD $(cpu-conditions) : xilink /nologo ;
|
||||
toolset.flags intel-win.archive .LD $(cpu-conditions) : xilink /lib /nologo ;
|
||||
toolset.flags intel-win.link .MT $(cpu-conditions) : mt -nologo ;
|
||||
toolset.flags intel-win.compile .ASM $(cpu-conditions) : $(cpu-assembler) -nologo ;
|
||||
toolset.flags intel-win.compile .MC $(cpu-conditions) : mc ;
|
||||
toolset.flags intel-win.compile .RC $(cpu-conditions) : rc ;
|
||||
}
|
||||
|
||||
# Depending on the settings, running of tests require some runtime DLLs.
|
||||
|
||||
@@ -24,7 +24,8 @@ import property ;
|
||||
import property-set ;
|
||||
|
||||
header = lzma.h ;
|
||||
names = lzma ;
|
||||
# liblzma only needed for VisualC++ builds
|
||||
names = lzma liblzma ;
|
||||
|
||||
library-id = 0 ;
|
||||
|
||||
|
||||
@@ -24,7 +24,9 @@ import property ;
|
||||
import property-set ;
|
||||
|
||||
header = zstd.h ;
|
||||
names = zstd ;
|
||||
# libzstd only needed for VisualC++ builds
|
||||
# *_static variants for prebuilt Windows static libraries
|
||||
names = zstd zstd_static libzstd libzstd_static ;
|
||||
|
||||
library-id = 0 ;
|
||||
|
||||
|
||||
@@ -187,5 +187,33 @@ obj foo : foo.cpp :
|
||||
|
||||
t.cleanup()
|
||||
|
||||
def test_choose_none():
|
||||
"""Tests choose when none of the alternatives match."""
|
||||
t = BoostBuild.Tester(use_test_config=0)
|
||||
t.write("Jamroot", """
|
||||
import configure ;
|
||||
obj fail : fail.cpp ;
|
||||
explicit pass fail ;
|
||||
obj foo : foo.cpp :
|
||||
[ configure.choose "which one?" : fail <define>FAIL ] ;
|
||||
""")
|
||||
t.write("fail.cpp", "#error fail.cpp\n")
|
||||
t.write("foo.cpp", """
|
||||
#ifdef FAIL
|
||||
#error FAIL is defined
|
||||
#endif
|
||||
""")
|
||||
t.run_build_system()
|
||||
t.expect_output_lines([
|
||||
" - which one? : none"])
|
||||
|
||||
# An up-to-date build should use the cache
|
||||
t.run_build_system()
|
||||
t.expect_output_lines([
|
||||
" - which one? : none (cached)"])
|
||||
t.expect_nothing_more()
|
||||
t.cleanup()
|
||||
|
||||
test_check_target_builds()
|
||||
test_choose()
|
||||
test_choose_none()
|
||||
|
||||
Reference in New Issue
Block a user