From cbbe68579fee4a2e54a88acf5dd86090a0c2cd4c Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 14 Oct 2006 08:17:47 +0000 Subject: [PATCH] Make gcc's PCH generator ignore the cpp sources, so that cpp-pch pch : pch.hpp pch.cpp ; work both on gcc and msvc. [SVN r35604] --- v2/tools/gcc.jam | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/v2/tools/gcc.jam b/v2/tools/gcc.jam index b67e9001e..06dd7bcbd 100644 --- a/v2/tools/gcc.jam +++ b/v2/tools/gcc.jam @@ -164,9 +164,20 @@ class gcc-pch-generator : pch-generator { import project ; import property-set ; + import type ; - rule run-pch ( project name ? : property-set : header ) + rule run-pch ( project name ? : property-set : sources + ) { + # Find the header in sources. Ignore any CPP sources. + local header ; + for local s in $(sources) + { + if [ type.is-derived [ $(s).type ] H ] + { + header = $(s) ; + } + } + # error handling # base name of header file should be the same as the base name # of precompiled header.