def METHOD_NAME(self, spec, prefix):
    args = []
    args.append("--with-mpi=" + spec["mpi"].prefix)
    args.append("--with-openblas=" + spec["openblas"].prefix)
    args.append("--with-libzip=" + spec["libzip"].prefix)
    args.append("--with-boost=" + spec["boost"].prefix)
    args.append("--with-protobuf=" + spec["protobuf"].prefix)
    if "+debug" in spec:
        args.append("--with-buildtype=debug")
    else:
        args.append("--with-buildtype=release")
    if "+1bitsgd" in spec:
        args.append("--1bitsgd=yes")
        args.append("--with-1bitsgd={0}/include".format(spec["cntk1bitsgd"].prefix))
    if "+asgd" in spec:
        args.append("--asgd=yes")
        args.append("--with-multiverso={0}".format(spec["multiverso"].prefix))
    else:
        args.append("--asgd=no")
    if "+opencv" in spec:
        args.append("--with-opencv=" + spec["opencv"].prefix)
    if "+kaldi" in spec:
        args.append("--with-kaldi=" + spec["kaldi"].prefix)
        args.append("--with-openfst=" + spec["openfst"].prefix)
    if "+cuda" in spec:
        args.append("--cuda=yes")
        args.append("--with-cuda={0}".format(spec["cuda"].prefix))
        args.append("--with-cub={0}".format(spec["cub"].prefix.include))
        args.append("--with-cudnn={0}".format(spec["cudnn"].prefix))
        args.append("--with-nccl={0}".format(spec["nccl"].prefix))
        args.append("--with-gdk-include={0}".format(spec["cuda"].prefix.include))
        args.append("--with-gdk-nvml-lib={0}/stubs".format(spec["cuda"].prefix.lib64))
    configure(*args)
    make()
    install_tree("bin", prefix.bin)
    install_tree("lib", prefix.lib)
    install_tree("Examples", join_path(prefix, "Examples"))
    install_tree("Tutorials", join_path(prefix, "Tutorials"))