def METHOD_NAME(self):
    spec = self.spec
    args = [
        "-DBLAS={0}".format("open" if spec["blas"].name == "openblas" else spec["blas"].name),
        "-DCPU_ONLY=%s" % ("~cuda" in spec),
        "-DUSE_CUDNN=%s" % ("+cuda" in spec),
        "-DBUILD_python=%s" % ("+python" in spec),
        "-DBUILD_python_layer=%s" % ("+python" in spec),
        "-DBUILD_matlab=%s" % ("+matlab" in spec),
        "-DUSE_OPENCV=%s" % ("+opencv" in spec),
        "-DUSE_LEVELDB=%s" % ("+leveldb" in spec),
        "-DUSE_LMDB=%s" % ("+lmdb" in spec),
        "-DGFLAGS_ROOT_DIR=%s" % spec["gflags"].prefix,
        "-DGLOG_ROOT_DIR=%s" % spec["glog"].prefix,
    ]
    if spec.satisfies("^openblas"):
        env["OpenBLAS_HOME"] = spec["openblas"].prefix
    if spec.satisfies("+lmdb"):
        env["LMDB_DIR"] = spec["lmdb"].prefix
    if spec.satisfies("+leveldb"):
        env["LEVELDB_ROOT"] = spec["leveldb"].prefix
    if spec.satisfies("+python"):
        version = spec["python"].version.up_to(1)
        args.append("-Dpython_version=%s" % version)
    if spec["hdf5"].satisfies("+mpi"):
        args.extend(
            [
                "-DCMAKE_C_COMPILER={0}".format(self.spec["mpi"].mpicc),
                "-DCMAKE_CXX_COMPILER={0}".format(self.spec["mpi"].mpicxx),
            ]
        )
    if "+cuda" in spec:
        if spec.variants["cuda_arch"].value[0] != "none":
            cuda_arch = spec.variants["cuda_arch"].value
            args.append(self.define("CUDA_ARCH_NAME", "Manual"))
            args.append(self.define("CUDA_ARCH_BIN", " ".join(cuda_arch)))
    return args