Beispiel #1
0
        public override bool Execute()
        {
            var log = new LogListener(Log);

            bool success = Link(buildCmdLine(), log) == 0;

            Output = new TaskItem(OutputFile);

            return(success);
        }
Beispiel #2
0
        int Link(String cmdline, LogListener log_listener)
        {
            Log.LogMessageFromText("nvlink " + cmdline, MessageImportance.Normal);
            Log.LogCommandLine(MessageImportance.Normal, "nvlink " + cmdline);

            var sinfo = new ProcessStartInfo("nvlink", cmdline);

            sinfo.UseShellExecute        = false;
            sinfo.RedirectStandardError  = true;
            sinfo.RedirectStandardOutput = true;

            Process process = Process.Start(sinfo);

            log_listener.Attach(process);

            process.WaitForExit();
            int exit_code = process.ExitCode;

            return(exit_code);
        }