[jamming] .obj output dir
fa658021 at skynet.be
Fri Feb 6 20:10:12 PST 2004
I'm new to Jam (to make a long story short I'm doing an internship in a company and they've asked me to write jamfiles for their projects) and although I find it quite nice to use the lack of documentation / tutorials / examples is really slowing me down :(
Anyway here's my question :
assume I'm writing a jamfile to build an exe which needs to link with several libs. I've got it working so that for example typing jam win32_debug will link to the debug libs, and jam win32_release to the release libs. I am able to build the exe in one version, do a jam clean, and rebuild in another version without any problems. So far so good ... Now the problem is when I build say the debug version, I'm left with all the .obj files, so trying to build the release version right after that (without doing a jam clean) will try to link the current debug .obj files with the release libs (instead of recompiling the sources with the release flags, since the .obj are already there), which of course is no good... Since this is a big project, doing a clean and rebuilding everything every time you switch versions is out of the question.
What I'd like to do is output all .obj files to a different dir for each version. I've tried LOCATE_TARGET and ALL_LOCATE_TARGET, and although ALL_LOCATE_TARGET does relocate the exe, the obj are still generated in the same dir as the sources. My question is what is the standard way to tell Jam to output the .obj to a certain dir ? (if there is any) Or should I just modify the c++ rule so that it /Fo's to a specific dir ? Will that raise any other path problems ? Should I add the .obj output path to SEARCH_SOURCE ? Any other suggestions on how to do this ? Thanks a lot for any help you can provide !
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jamming