Boost logo

Boost-Build :

Subject: [Boost-build] use of precompiled headers fail
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2011-12-15 07:39:16


Hi all,

I'm trying to follow the directions here

http://www.boost.org/boost-build2/doc/html/bbv2/reference/precompiled_headers.html

to enable the use of precompiled headers.

Our source code layout is

foo/Jamfile.v2
foo/src/*.(cpp|h)

In my jamfile I have specified

cpp-pch stdafx : src/stdafx.h ;

lib CUtils : [ glob src/*.cpp ] stdafx : <link>static ;

This causes bjam to try to generate the precompiled header file.
However, it fails with

\stdafx.pch.cpp(1) : fatal error C1083: Cannot open
  include file: 'stdafx.h': No such file or directory

I guess this is not surprising as this header is inside the "src/"
directory.

Is this a bug, or is it a requirement that the Jamfile must be located
in the same directory as the source itself?

regards

Thorsten

PS: this is my version:

Boost.Build V2 (Milestone 12)
Boost.Jam 03.1.19


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk