Reputation: 13910
I'm building a library for which one file requires an additional include path. Is there a way to adjust the include path for compilation of a single file?
bld(features="cxx cxxshlib",
source=[so, many, files, from an ant_glob],
includes=[Some path that's really only needed for one interface file])
I'd be happy with a solution that is use
based, too.
Upvotes: 1
Views: 174
Reputation: 1405
You need to compile the specfic file by using objects
and then use
the result.
Something like this:
def build(bld):
# build the specfifc object
bld.objects(source="foo.cpp", includess="path/to/directory", target="foo")
# build the library and include that object file using 'use='
bld.stlib(source='bla.cpp blu.cpp', includes="this/path that/path", target='mylibrary', use='foo')
Upvotes: 0
Reputation: 40
I think most solutions will be more lines of code than just compiling your one file separately.
Upvotes: 0