Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

build dependent boost libs after doing bcp

So I'm using a set of boost libraries, but the sheer number of include files makes checking out a clean copy really slow. I'm sure most people who are using boost with svn have noticed this. I googled around for a little while to find a nice utility from boost called bcp that will copy only the dependent header files to a directory that I specify. So, what I'd like to do is provide a minimal number of header files in svn and allow the developer to compile everything as necessary. The first step would be to copy the necessary header files and checkin all the necessary precompiled libs. The next step would be to throw away the pre-compiled libs and make it a pre-build step in whatever build system I'm using for my project (in my case Visual Studio, but make would be perfectly fine too). My question is this

Does anybody know how to build only the libs necessary for a subset of headers?

I'm doing a bcp along the lines of this

bcp.exe --scan C:\path\to\my\files\main.cpp C:\path\to\my\files\someOtherCppFilesToo.cpp C:\path\to\reduced\boost

The internet seems to think I can do something like this

cd C:\path\to\reduced\boost
bootstrap.exe
b2.exe

Now the problem is that I can't figure out if there's some way to copy over the compile/bootstrap/jam/whatever configuration so that boost.build and bootstrap know how to configure/compile everything. I obviously don't want to copy every file from the boost directory, because that would defeat the whole purpose of reducing the boost includes.

like image 211
xaviersjs Avatar asked Feb 17 '15 15:02

xaviersjs


1 Answers

Well, I believe you were close to it:

bcp.exe --scan --boost=path_to_boost_dir main.cpp someOtherCppFilesToo.cpp myboost
bcp.exe --boost=path_to_boost_dir build myboost
cd myboost
bootstrap.bat
b2 the_modules_you_want_to_build
like image 179
Heyji Avatar answered Nov 05 '22 20:11

Heyji