Esempio n. 1
0
        public void FillProjectSpecificMissingInfo(Project project, CppCliMode cliMode, LocalFileSystemDirectory targetDir)
        {
            if (targetDir != null)
            {
                PDBFileName = string.Format("{0}\\{1}.{2}.pdb",
                                            targetDir.AbsolutePath,
                                            project.Module.Name, project.Name);
            }

            if (cliMode != CppCliMode.Disabled)
            {
                // Fixing some settings to support C++/CLI mode
                switch (cliMode)
                {
                case CppCliMode.Enabled:
                    CompileAsManaged = ManagedCppType.Managed;
                    break;

                case CppCliMode.Pure:
                    CompileAsManaged = ManagedCppType.Pure;
                    break;

                case CppCliMode.Safe:
                    CompileAsManaged = ManagedCppType.Safe;
                    break;

                case CppCliMode.OldSyntax:
                    CompileAsManaged = ManagedCppType.OldSyntax;
                    break;
                }

                if (DebugInformationFormat == DebugInformationFormat.EditAndContinue)
                {
                    DebugInformationFormat = DebugInformationFormat.ProgramDatabase;
                }

                MinimalRebuild          = false;
                SmallerTypeCheck        = false;
                FloatingPointExceptions = false;

                if (project.Type == ProjectType.StaticLibrary)
                {
                    Defines = Defines.Concat(new[] { "_LIB" }).ToArray();
                }
            }
        }
        public void FillProjectSpecificMissingInfo(Project project, CppCliMode cliMode, LocalFileSystemDirectory targetDir)
        {
            if (targetDir != null)
            {
                PDBFileName = string.Format("{0}{3}{1}.{2}.pdb",
                                            targetDir.AbsolutePath,
                                            project.Module.Name, project.Name,
                                            Path.DirectorySeparatorChar);
            }

            if (cliMode != CppCliMode.Disabled)
            {
                // Fixing some settings to support C++/CLI mode
                switch (cliMode)
                {
                case CppCliMode.Enabled:
                    CompileAsManaged = ManagedCppType.Managed;
                    break;

                case CppCliMode.Pure:
                    CompileAsManaged = ManagedCppType.Pure;
                    break;

                case CppCliMode.Safe:
                    CompileAsManaged = ManagedCppType.Safe;
                    break;

                case CppCliMode.OldSyntax:
                    CompileAsManaged = ManagedCppType.OldSyntax;
                    break;
                }

                if (!IsDebugInformationFormatSpecified && suite.ActiveGoal.Has(Suite.DebugGoal.Name))
                {
                    DebugInformationFormat = DebugInformationFormat.ProgramDatabase;
                }

                MinimalRebuild          = false;
                SmallerTypeCheck        = false;
                FloatingPointExceptions = false;

                if (project.Type == ProjectType.StaticLibrary)
                {
                    Defines = Defines.Concat(new[] { "_LIB" }).ToArray();
                }
            }

            if (project.EffectiveVersion != null)
            {
                Defines = Defines.Concat(new[]
                {
                    String.Format("BARI_PROJECT_VERSION=\"{0}\"", project.EffectiveVersion)
                }).ToArray();
            }

            if (project.EffectiveCopyright != null)
            {
                Defines = Defines.Concat(new[]
                {
                    String.Format("BARI_PROJECT_COPYRIGHT=\"{0}\"", project.EffectiveCopyright)
                }).ToArray();
            }
        }