[jamming] Jam dependency scanning with C++
Kai Backman
kaib at google.com
Thu Jul 20 01:12:37 PDT 2006
Hi Craig,
I'm working with a project with a highly non-flat directory structure and jam
has no problems. The trick is to set the HDRS variable on the source
files. From the jambase manual at:
http://public.perforce.com/public/jam/src/Jambase.html
---<snip>---
HDRS
Directories to be searched for header files. This is used by the
Object rule to:
set up search paths for finding files returned by header scans
add -I flags on compile commands
---<snip>---
You can set this globally or on source by source basis. I do both. You
can easily check if it's working by using the -dd flags and check for
"Includes" lines. A smart thing is to set them relative to TOP using:
HDRS +=
[ FDirName $(TOP) my_source_inc ]
[ FDirName $(TOP) my_other_inc ] ;
Take care,
Kai
On 7/19/06, Craig Kadziolka <craigk at wp.pl> wrote:
> > This should work out of the box, assuming that jam knows your include
> > paths.
>
> I think this is exactly my problem. I am not using a flat directory
> structure, and I think that might be why my dependency checking isnt
> working. Does anyone know how to tell Jam what my include paths are?
--
Kai Backman, Software Engineer, kaib at google.com
More information about the jamming
mailing list