Skip to content

Commit e697dda

Browse files
committed
Add documentation for fetching an alternate Boost archive
1 parent 13af761 commit e697dda

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,23 @@ target_link_libraries(lib_using_filesystem PUBLIC Boost::filesystem)
1919
target_link_libraries(lib_using_header_only PUBLIC Boost::boost)
2020
```
2121

22+
## Configuration
23+
24+
Boost will automatically be downloaded from GitHub as a minified archive created with the `repack.sh` script.
25+
26+
If that is not acceptable to you, you can use an alternate Boost version, apply custom patches or just mirror the current archive in your internal network like so:
27+
```
28+
set(BOOST_URL http://internal.mirror/boost.7z)
29+
set(BOOST_URL_SHA256 foobar)
30+
add_subdirectory(boost-cmake)
31+
```
32+
33+
If you have Boost sources already available and want to point to them, you can use the following:
34+
```
35+
set(BOOST_SOURCE /path/to/boost)
36+
add_subdirectory(boost-cmake)
37+
```
38+
2239
## Motivation
2340

2441
Most people struggle building Boost for various platforms or using package managers to get the right version, so I figured I would open-source the solution similar to the one I developed while I worked at Spotify.

0 commit comments

Comments
 (0)