def windows_build(args):
    logging.info("Using vcvars environment:\n{}".format(args.vcvars))

    path = args.output
    os.makedirs(path, exist_ok=True)

    mxnet_root = get_mxnet_root()
    logging.info("Found MXNet root: {}".format(mxnet_root))

    with remember_cwd():
        os.chdir(path)
        cmd = "\"{}\" && cmake -G \"NMake Makefiles JOM\" {} {}".format(args.vcvars,
                                                                        CMAKE_FLAGS[args.flavour],
                                                                        mxnet_root)
        logging.info("Generating project with CMake:\n{}".format(cmd))
        check_call(cmd, shell=True)

        cmd = "\"{}\" && jom".format(args.vcvars)
        logging.info("Building with jom:\n{}".format(cmd))

        t0 = int(time.time())
        check_call(cmd, shell=True)

        logging.info("Build flavour: {} complete in directory: \"{}\"".format(args.flavour, os.path.abspath(path)))
        logging.info("Build took {}".format(datetime.timedelta(seconds=int(time.time() - t0))))
    windows_package(args)