2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 01:12:13 +00:00

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]
This commit is contained in:
Vladimir Prus
2006-10-14 08:17:47 +00:00
parent 806868ce2e
commit cbbe68579f

View File

@@ -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.