Skip to content

Commit

Permalink
[build_usd] Disable building OpenSubdiv with Ninja on windows
Browse files Browse the repository at this point in the history
Ninja seems to error - a bunch of warnings that are set as errors - so
just use the Visual Studio builder for it for now
  • Loading branch information
pmolodo committed Oct 19, 2018
1 parent d7cc374 commit c61a3c9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion build_scripts/build_usd.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def RunCMake(context, force, extraArgs = None):

# On Windows, we need to explicitly specify the generator to ensure we're
# building a 64-bit project. (Surely there is a better way to do this?)
# TODO: figure out exactly what "vcvarsall.bat x64" sets to force x64
if generator is None and Windows():
if IsVisualStudio2017OrGreater():
generator = "Visual Studio 15 2017 Win64"
Expand Down Expand Up @@ -839,7 +840,17 @@ def InstallOpenSubdiv(context, force, buildArgs):
# Add on any user-specified extra arguments.
extraArgs += buildArgs

RunCMake(context, force, extraArgs)
oldGenerator = context.cmakeGenerator

# OpenSubdiv seems to error when building on windows w/ Ninja...
# ...so just use the default generator (ie, VisualStudio on windows)
# until someone can sort it out
if oldGenerator == "Ninja" and Windows():
context.cmakeGenerator = None
try:
RunCMake(context, force, extraArgs)
finally:
context.cmakeGenerator = oldGenerator

OPENSUBDIV = Dependency("OpenSubdiv", InstallOpenSubdiv,
"include/opensubdiv/version.h")
Expand Down

0 comments on commit c61a3c9

Please sign in to comment.