Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preprocess multiple files into single file

I'm trying to simplify a distribution and build process that uses boost::shared_ptr (Android and STLport does not include shared_ptr). I used Boost's bcp to copy out shared_ptr and its dependencies. That resulted in 340 dependencies spread across numerous directories:

$ mkdir boost-shared_ptr
$ cd boost-1.54.0
$ ./dist/bin/bcp shared_ptr ../boost-shared_ptr
...
$ cd ../boost-shared_ptr
$ find . -type f | wc -l
340

Is there a way to pre-process boost::shared_ptr into a single file, and then place that single file (shared_ptr.hpp) into my deps/ directory?

like image 796
jww Avatar asked Mar 14 '26 13:03

jww


1 Answers

This is bad idea. Numerous cons with very little pros. Always use boost files "as-is". In the majority of cases they are carefully engineered.

I can bet your users will benefit if you will give them your library that include original boost files. They will be able to download it themselves and/or upgrade the version.

like image 173
Kirill Kobelev Avatar answered Mar 17 '26 02:03

Kirill Kobelev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!