
Steve, thank you as always. This worked perfectly. One quick follow-up question. This library depends on pthreads, and I had been using the lib pthreads ; dependency and adding it to the sources list of the library. It works perfectly with clang but fails with gcc 4.8.2. I switched it to using <threading>multi and it still didn't work until I also added <threading>multi to the application that is linking to it : ## Library alias hts : libhts.a z : <link>static *<threading>multi* : : <include>htslib ; ## Application (boost-test) run [ glob *.cpp ] /gamgee//gamgee /gamgee/libs//hts boost_unit_test_framework : : : <define>BOOST_ALL_DYN_LINK *<threading>multi* : run ; I thought that the application would learn from the library's dependency on multi-threading and automatically turn it on, but it didn't. I tried moving the <threading>multi to the requirements (together with the <include>htslib) but that didn't do it either. Do you have any insights on this? Mauricio Carneiro, Ph.D. http://www.broadinstitute.org/~carneiro/ On Sun, Mar 23, 2014 at 7:08 PM, Steven Watanabe <watanabesj@gmail.com>wrote:
AMDG
On 03/23/2014 11:24 AM, Mauricio Carneiro wrote:
I am using boost-build to build my project, but I have added a static library as a dependency that is built using GNU make. If I build this library manually, I can link it to my project in boost build using this simple Jamfile:
lib hts : : <link>static <file>lib/lib.a : : <include>lib_headers ;
Is there a way to tell boost-build to run make on the directory if the lib/lib.a is not present there?
You'll need a custom rule that runs make:
path-constant make-dir : path/to/makefile/directory ; actions external-make { cd $(make-dir) && make }
make lib.a : : @external-make : <location>directory/of/lib.a ;
alias hts : lib.a : <link>static : : <include>lib_headers ;
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users