build dependent boost libs after doing bcp
Asked Answered
K

1

8

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.

Kiernan answered 17/2, 2015 at 15:49 Comment(1)
Similar post #3627125Colby
S
3

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
Sekofski answered 13/3, 2017 at 21:29 Comment(1)
I was getting an error during ./b2 when inside myboost/: could not find predef.jam. To solve it used bcp on predef (like the answer does to build).Heterotrophic

© 2022 - 2024 — McMap. All rights reserved.