Beispiel #1
0
        public SimpleSet Minus(SimpleSet subtrahend)
        {
            subtrahend.elements.Sort();
            int i = 0;

            while (i < elements.Count)
            {
                if (subtrahend.elements.BinarySearch(elements[i]) >= 0)
                {
                    elements.RemoveAt(i);
                }
                else
                {
                    i++;
                }
            }
            return(this);
        }
Beispiel #2
0
 public static void RemovePlatformDependencies(VCConfiguration config, VersionInformation viOld)
 {
     CompilerToolWrapper compiler = CompilerToolWrapper.Create(config);
     SimpleSet minuend = new SimpleSet(compiler.PreprocessorDefinitions);
     SimpleSet subtrahend = new SimpleSet(viOld.GetQMakeConfEntry("DEFINES").Split(new char[] { ' ', '\t' }));
     compiler.SetPreprocessorDefinitions(minuend.Minus(subtrahend).JoinElements(','));
 }
Beispiel #3
0
        public void SetupConfiguration(VCConfiguration config, VersionInformation viNew)
        {
            bool isWinPlatform = (!viNew.IsWinCEVersion());

            CompilerToolWrapper compiler = CompilerToolWrapper.Create(config);
            SimpleSet ppdefs = new SimpleSet(compiler.PreprocessorDefinitions);
            ICollection newPPDefs = viNew.GetQMakeConfEntry("DEFINES").Split(new char[] { ' ', '\t' });
            compiler.SetPreprocessorDefinitions(ppdefs.Union(newPPDefs).JoinElements(','));

            #if ENABLE_WINCE
            // search prepocessor definitions for Qt modules and add deployment settings
            if (!isWinPlatform)
            {
                DeploymentToolWrapper deploymentTool = DeploymentToolWrapper.Create(config);
                if (deploymentTool != null)
                {
                    deploymentTool.Clear();
                    deploymentTool.AddWinCEMSVCStandardLib(IsDebugConfiguration(config), dte);

                    List<QtModuleInfo> availableQtModules = QtModules.Instance.GetAvailableModuleInformation();
                    foreach (string s in ppdefs.Elements)
                    {
                        foreach (QtModuleInfo moduleInfo in availableQtModules)
                        {
                            if (moduleInfo.Defines.Contains(s))
                                AddDeploySettings(deploymentTool, moduleInfo.ModuleId, config, null, viNew);
                        }
                    }
                }
            }
            #endif

            VCLinkerTool linker = (VCLinkerTool)((IVCCollection)config.Tools).Item("VCLinkerTool");
            if (linker == null)
                return;

            if (isWinPlatform)
                linker.SubSystem = subSystemOption.subSystemWindows;
            else
                linker.SubSystem = subSystemOption.subSystemNotSet;

            SetTargetMachine(linker, viNew);
        }
Beispiel #4
0
 public SimpleSet Minus(SimpleSet subtrahend)
 {
     subtrahend.elements.Sort();
     int i = 0;
     while (i < elements.Count)
     {
         if (subtrahend.elements.BinarySearch(elements[i]) >= 0)
             elements.RemoveAt(i);
         else
             i++;
     }
     return this;
 }