Inheritance: CompilerCacheBase, ICompilerCache
Example #1
0
        public static ICompilerCache Get(bool direct, string cachedir, string compiler, string workdir, Dictionary <string, string> envs, out ICompiler comp)
        {
            comp = null;
            ICompilerCache rv = null;

            if (Settings.ServiceMode)
            {
                try {
                    rv = new CClashServerClient(cachedir);
                } catch (CClashWarningException) {
                    rv = new NullCompilerCache(cachedir);
                }
            }

            if (rv == null)
            {
                if (direct)
                {
                    Logging.Emit("use direct mode");
                    rv = new DirectCompilerCache(cachedir);
                }
                else
                {
                    throw new NotSupportedException("ppmode is not supported yet");
                }
            }
            comp = rv.SetCompiler(compiler, workdir, envs);
            return(rv);
        }
Example #2
0
        public static ICompilerCache Get(bool direct, string cachedir, string compiler, string workdir, Dictionary<string,string> envs, out ICompiler comp )
        {
            comp = null;
            ICompilerCache rv = null;
            if (Settings.ServiceMode) {
                try {
                    rv = new CClashServerClient(cachedir);
                } catch (CClashWarningException) {
                    rv = new NullCompilerCache(cachedir);
                }
            }

            if ( rv == null )
            {
                if (direct) {
                    Logging.Emit("use direct mode");
                    rv = new DirectCompilerCache(cachedir);
                } else {
                    throw new NotSupportedException("ppmode is not supported yet");
                }
            }
            comp = rv.SetCompiler(compiler, workdir, envs);
            return rv;
        }