コード例 #1
0
ファイル: UnittestCore.cs プロジェクト: DinrusGroup/Mono-D
		public static string GetCommandArgs(string baseCommandArgs, string filePath, DProject project, DProjectConfiguration conf)
		{
			var compiler =project.Compiler;
			ProjectBuilder.PrjPathMacroProvider prjPath = new ProjectBuilder.PrjPathMacroProvider {
				slnPath = project.ParentSolution != null ? ProjectBuilder.EnsureCorrectPathSeparators(project.ParentSolution.BaseDirectory) : ""
			};
			
			List<string> includes = new List<string>(project.IncludePaths);
			includes.Add(project.BaseDirectory.FullPath);

			string[] src = {filePath};
			var compilerMacro = new UnittestMacros
			{
				ObjectsStringPattern = compiler.ArgumentPatterns.ObjectFileLinkPattern,
				IncludesStringPattern = compiler.ArgumentPatterns.IncludePathPattern,

				SourceFiles = src,
				Includes = ProjectBuilder.FillInMacros(includes, prjPath),
				Libraries = ProjectBuilder.GetLibraries(conf, compiler),

				HasMain = HasMainMethod(D_Parser.Misc.GlobalParseCache.GetModule(filePath)),
				compilerFlags = conf.ExtraCompilerArguments,
				linkerFlags = conf.ExtraLinkerArguments
			};
			
			return ProjectBuilder.FillInMacros(baseCommandArgs,compilerMacro, prjPath);
		}
コード例 #2
0
ファイル: UnittestCore.cs プロジェクト: Geod24/Mono-D
        static string GetCommandArgs(string baseCommandArgs, string filePath, DProject project, DProjectConfiguration conf)
        {
            var compiler =project.Compiler;
            ProjectBuilder.PrjPathMacroProvider prjPath = new ProjectBuilder.PrjPathMacroProvider {
                slnPath = project.ParentSolution != null ? ProjectBuilder.EnsureCorrectPathSeparators(project.ParentSolution.BaseDirectory) : ""
            };

            List<string> includes = new List<string>(project.IncludePaths);
            includes.Add(project.BaseDirectory.FullPath);

            string[] src = {filePath};
            OneStepBuildArgumentMacroProvider compilerMacro = new OneStepBuildArgumentMacroProvider
            {
                ObjectsStringPattern = compiler.ArgumentPatterns.ObjectFileLinkPattern,
                IncludesStringPattern = compiler.ArgumentPatterns.IncludePathPattern,

                SourceFiles = src,
                Includes = ProjectBuilder.FillInMacros(includes, prjPath),
                Libraries = ProjectBuilder.GetLibraries(conf, compiler),

            };

            return ProjectBuilder.FillInMacros(baseCommandArgs,compilerMacro, prjPath);
        }