From 2f1f6190ff874f29d4451ca968a3e9781db7230a Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 14 Oct 2006 08:26:13 +0000 Subject: [PATCH] Fix a problem with compilation options being sometimes ignored when generating PCH. When an action generated two targets, target variables must be set on both, on just on the first one. Patch from Franz Schnyder. tools/ * msvc.jam (compile.c++): Call get-rspline on all 'targets', to implicitly verify there's just one element. (compile.c.pch): Call get-rspline on all targets. (compile.c++.pch): Likewise. [SVN r35605] --- v2/tools/msvc.jam | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/v2/tools/msvc.jam b/v2/tools/msvc.jam index c80f5f98e..10fa58732 100644 --- a/v2/tools/msvc.jam +++ b/v2/tools/msvc.jam @@ -691,7 +691,7 @@ rule compile.c ( targets + : sources * : properties * ) rule compile.c++ ( targets + : sources * : properties * ) { - get-rspline $(targets[1]) : -TP ; + get-rspline $(targets) : -TP ; compile-c-c++ $(<) : $(>) [ on $(<) return $(PCH_FILE) ] [ on $(<) return $(PCH_HEADER) ] ; } @@ -705,6 +705,7 @@ rule compile.c.pch ( targets + : sources * : properties * ) C++FLAGS on $(targets[1]) = ; DEPENDS $(<) : [ on $(<) return $(PCH_SOURCE) ] ; get-rspline $(targets[1]) : -TC ; + get-rspline $(targets[2]) : -TC ; compile-c-c++-pch $(targets) : $(sources) [ on $(<) return $(PCH_SOURCE) ] ; } @@ -712,6 +713,7 @@ rule compile.c++.pch ( targets + : sources * : properties * ) { DEPENDS $(<) : [ on $(<) return $(PCH_SOURCE) ] ; get-rspline $(targets[1]) : -TP ; + get-rspline $(targets[2]) : -TP ; compile-c-c++-pch $(targets) : $(sources) [ on $(<) return $(PCH_SOURCE) ] ; }