Skip to content

Commit

Permalink
[build_usd] ninja can't use --config - use CMAKE_BUILD_TYPE
Browse files Browse the repository at this point in the history
  • Loading branch information
pmolodo committed Oct 19, 2018
1 parent c61a3c9 commit e91c1ad
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build_scripts/build_usd.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,16 +218,22 @@ def RunCMake(context, force, extraArgs = None):
if MacOS():
osx_rpath = "-DCMAKE_MACOSX_RPATH=ON"

# Note: we use -DCMAKE_BUILD_TYPE=Release for single-configuration
# generators (Ninja, make), and --config Relase for multi-configuration
# generators (Visual Studio); technically we don't need BOTH at the same
# time, but specifying both is simpler than branching
with CurrentWorkingDirectory(buildDir):
Run('cmake '
'-DCMAKE_INSTALL_PREFIX="{instDir}" '
'-DCMAKE_PREFIX_PATH="{depsInstDir}" '
'-DCMAKE_BUILD_TYPE=Release '
'{osx_rpath} '
'{generator} '
'{extraArgs} '
'"{srcDir}"'
.format(instDir=instDir,
depsInstDir=context.instDir,
cmakeBuildType=cmakeBuildType,
srcDir=srcDir,
osx_rpath=(osx_rpath or ""),
generator=(generator or ""),
Expand All @@ -236,7 +242,8 @@ def RunCMake(context, force, extraArgs = None):
.format(multiproc=("/M:{procs}"
if generator and "Visual Studio" in generator
else "-j{procs}")
.format(procs=context.numJobs)))
.format(procs=context.numJobs),
buildConfig=buildConfig))

def PatchFile(filename, patches, multiLineMatches=False):
"""Applies patches to the specified file. patches is a list of tuples
Expand Down

0 comments on commit e91c1ad

Please sign in to comment.