Skip to content

Commit 1145258

Browse files
committed
Boost: Use Headers instead of building when not required
When building USD without Python, OIIO or VDB, Boost libs aren't required. In this scenario, it is preferable to just copy over the headers instead and save some time and complexity. This also has a significant benefit that it allows the core USD build to be supported on platforms that Boost doesn't natively build on yet like iOS and visionOS. It means that the build_usd.py script doesn't need to carry as many patches to Boost itself if someone is just building the core USD library. This is similar to [PR 2914](#2914) but can short circuit the entire bootstrap and b2 process, which may still error on platforms that b2 doesn't understand.
1 parent 0244f25 commit 1145258

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

build_scripts/build_usd.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,8 +756,15 @@ def InstallBoost_Helper(context, force, buildArgs):
756756
"*/libs/wave/test/testwave/testfiles/utf8-test-*"
757757
]
758758

759+
headersOnly = not (context.buildOIIO or context.enableOpenVDB or context.buildPython)
760+
759761
with CurrentWorkingDirectory(DownloadURL(BOOST_URL, context, force,
760762
dontExtract=dontExtract)):
763+
if headersOnly:
764+
headersDir = os.path.abspath("./boost")
765+
CopyDirectory(context, headersDir, "include/boost")
766+
return
767+
761768
if Windows():
762769
bootstrap = "bootstrap.bat"
763770
else:

0 commit comments

Comments
 (0)