if IS_WINDOWS:
my_env = overlay_windows_vcvars(my_env)
+ # When using Ninja under Windows, the gcc toolchain will be chosen as default.
+ # But it should be set to MSVC as the user's first choice.
+ if USE_NINJA:
+ cc = my_env.get('CC', 'cl')
+ cxx = my_env.get('CXX', 'cl')
+ my_env['CC'] = cc
+ my_env['CXX'] = cxx
return my_env
check_call(['cmake', '--build', '.', '--target', 'install', '--config', build_type, '--', '-j', str(j)],
cwd=build_dir, env=my_env)
else:
- check_call(['msbuild', 'INSTALL.vcxproj', '/p:Configuration={}'.format(build_type)],
+ check_call(['msbuild', 'INSTALL.vcxproj', '/p:Configuration={} /maxcpucount:{}'.format(build_type, j)],
cwd=build_dir, env=my_env)
else:
if USE_NINJA: