Наша сборка Qt VS Tools
giy
2022-09-02 ca47896204482bf4a6979e3838bf7f09f61cebeb
QtVsTools.Core/CompilerToolWrapper.cs
@@ -26,11 +26,11 @@
**
****************************************************************************/
using Microsoft.VisualStudio.VCProjectEngine;
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using Microsoft.VisualStudio.VCProjectEngine;
namespace QtVsTools.Core
{
@@ -44,7 +44,7 @@
    /// Using VCCLCompilerTool directly will break the VS integration for Win CE.
    class CompilerToolWrapper
    {
        private VCCLCompilerTool compilerTool;
        private readonly VCCLCompilerTool compilerTool;
        private readonly Object compilerObj;
        private readonly Type compilerType;
@@ -302,13 +302,6 @@
            return GetStringProperty("AdditionalIncludeDirectories");
        }
        public string GetPrecompiledHeaderFile()
        {
            if (compilerTool != null)
                return compilerTool.PrecompiledHeaderFile;
            return GetStringProperty("PrecompiledHeaderFile");
        }
        public string GetPrecompiledHeaderThrough()
        {
            if (compilerTool != null)
@@ -326,20 +319,6 @@
            if (obj == null)
                return pchOption.pchNone;
            return (pchOption)obj;
        }
        public void SetDebugInformationFormat(debugOption value)
        {
            if (compilerTool != null) {
                compilerTool.DebugInformationFormat = value;
            } else {
                compilerType.InvokeMember(
                    "DebugInformationFormat",
                    BindingFlags.SetProperty,
                    null,
                    compilerObj,
                    new object[] { value });
            }
        }
        public runtimeLibraryOption RuntimeLibrary
@@ -364,62 +343,6 @@
                } else {
                    compilerTool.RuntimeLibrary = value;
                }
            }
        }
        public void SetOptimization(optimizeOption value)
        {
            if (compilerTool != null) {
                compilerTool.Optimization = value;
            } else {
                compilerType.InvokeMember(
                    "Optimization",
                    BindingFlags.SetProperty,
                    null,
                    compilerObj,
                    new object[] { value });
            }
        }
        public void SetTreatWChar_tAsBuiltInType(bool value)
        {
            if (compilerTool != null) {
                compilerTool.TreatWChar_tAsBuiltInType = value;
            } else {
                compilerType.InvokeMember(
                    "TreatWChar_tAsBuiltInType",
                    BindingFlags.SetProperty,
                    null,
                    compilerObj,
                    new object[] { value });
            }
        }
        public void SetPrecompiledHeaderFile(string file)
        {
            if (compilerTool != null) {
                compilerTool.PrecompiledHeaderFile = file;
            } else {
                compilerType.InvokeMember(
                    "PrecompiledHeaderFile",
                    BindingFlags.SetProperty,
                    null,
                    compilerObj,
                    new object[] { file });
            }
        }
        public void SetPrecompiledHeaderThrough(string value)
        {
            if (compilerTool != null) {
                compilerTool.PrecompiledHeaderThrough = value;
            } else {
                compilerType.InvokeMember(
                    "PrecompiledHeaderThrough",
                    BindingFlags.SetProperty,
                    null,
                    compilerObj,
                    new object[] { value });
            }
        }