diff --git a/src/build/configure.jam b/src/build/configure.jam index b3cd94db9..f9df172b6 100644 --- a/src/build/configure.jam +++ b/src/build/configure.jam @@ -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 ; } } diff --git a/src/tools/intel-win.jam b/src/tools/intel-win.jam index 652eaa3c9..16fe1824b 100644 --- a/src/tools/intel-win.jam +++ b/src/tools/intel-win.jam @@ -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. diff --git a/src/tools/lzma.jam b/src/tools/lzma.jam index 0ceeff117..465d1d693 100644 --- a/src/tools/lzma.jam +++ b/src/tools/lzma.jam @@ -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 ; diff --git a/src/tools/zstd.jam b/src/tools/zstd.jam index 068527f51..2cba82d6b 100644 --- a/src/tools/zstd.jam +++ b/src/tools/zstd.jam @@ -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 ; diff --git a/test/configure.py b/test/configure.py index 573e1ecef..85fbbbc86 100644 --- a/test/configure.py +++ b/test/configure.py @@ -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 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()