示例#1
0
 public virtual void FastBuildUnitys(Configuration conf, CommonTarget target)
 {
     conf.FastBuildBlobbed          = true;
     conf.FastBuildUnityPath        = Path.Combine(Globals.TmpDirectory, @"unity\[project.Name]");
     conf.IncludeBlobbedSourceFiles = false;
     conf.IsBlobbed = false;
 }
示例#2
0
        public override void ConfigureAll(Configuration conf, CommonTarget target)
        {
            base.ConfigureAll(conf, target);

            conf.SolutionFolder = "StaticLibs";

            // intentionally in a subfolder
            conf.PrecompHeader = @"src\pch.h";
            conf.PrecompSource = @"src\pch.cpp";

            conf.IncludePaths.Add(SourceRootPath);

            switch (target.Optimization)
            {
            case Optimization.Debug:
                conf.SourceFilesBuildExclude.Add(@"src\ensure_release.cpp");
                break;

            case Optimization.Release:
                // use a different method to exclude ensure_debug.cpp
                conf.SourceFilesBuildExcludeRegex.Add(Util.RegexPathCombine("src", @"ensure_d.*\.cpp$"));
                break;

            default:
                throw new Error("Unexpected optimization " + target.Optimization);
            }
        }
示例#3
0
        public virtual void ConfigureAll(Configuration conf, CommonTarget target)
        {
            conf.ProjectFileName = "[project.Name]_[target.Platform]";
            if (target.DevEnv != DevEnv.xcode4ios)
            {
                conf.ProjectFileName += "_[target.DevEnv]";
            }
            conf.ProjectPath = Path.Combine(Globals.TmpDirectory, @"projects\[project.Name]");
            conf.IsFastBuild = target.BuildSystem == BuildSystem.FastBuild;

            conf.IntermediatePath = Path.Combine(Globals.TmpDirectory, @"obj\[target.DirectoryName]\[project.Name]");

            // intentionally put all of the project outputs in their own directory
            conf.TargetPath = Path.Combine(Globals.OutputDirectory, @"[target.DirectoryName]\[project.Name]");

            conf.TargetLibraryPath = Path.Combine(Globals.TmpDirectory, @"lib\[target.DirectoryName]\[project.Name]");

            conf.Output = Configuration.OutputType.Lib; // defaults to creating static libs

            conf.Options.Add(Options.Vc.Compiler.CppLanguageStandard.CPP17);

            conf.Options.Add(Options.Vc.General.TreatWarningsAsErrors.Enable);

            conf.Options.Add(Options.Vc.Linker.GenerateMapFile.Disable);
        }
示例#4
0
        public override void ConfigureAll(Configuration conf, CommonTarget target)
        {
            base.ConfigureAll(conf, target);

            conf.AddProject <ExeProject>(target);
            conf.AddProject <Dll1Project>(target);
            conf.AddProject <StaticLib1Project>(target);
            conf.AddProject <StaticLib2Project>(target);
        }
示例#5
0
        public virtual void BlobNoBlob(Configuration conf, CommonTarget target)
        {
            conf.FastBuildBlobbed = false;
            conf.IsBlobbed        = false;

            if (conf.IsFastBuild)
            {
                conf.ProjectName += "_NoBlob";
            }
        }
示例#6
0
        public virtual void ConfigureFastBuild(Configuration conf, CommonTarget target)
        {
            conf.SolutionFolder   = "FastBuild/" + conf.SolutionFolder;
            conf.ProjectName     += "_FastBuild";
            conf.ProjectFileName += "_FastBuild";

            conf.Defines.Add("USES_FASTBUILD");

            // Force writing to pdb from different cl.exe process to go through the pdb server
            conf.AdditionalCompilerOptions.Add("/FS");
        }
示例#7
0
        public override void ConfigureAll(Configuration conf, CommonTarget target)
        {
            base.ConfigureAll(conf, target);

            conf.SolutionFolder = "StaticLibs";

            // skip the generation of the lib, and use the obj for the link instead
            conf.Options.Add(Options.Vc.Linker.UseLibraryDependencyInputs.Enable);

            conf.IncludePaths.Add(SourceRootPath);
        }
示例#8
0
        public override void ConfigureAll(Configuration conf, CommonTarget target)
        {
            base.ConfigureAll(conf, target);

            conf.Output = Configuration.OutputType.Exe;

            conf.PrecompHeader = "stdafx.h";
            conf.PrecompSource = "stdafx.cpp";

            conf.AddPrivateDependency <Dll1Project>(target);
            conf.AddPrivateDependency <StaticLib2Project>(target);

            conf.Defines.Add("CREATION_DATE=\"August 2021\"");
        }
示例#9
0
 public virtual void ConfigureAll(Configuration conf, CommonTarget target)
 {
     conf.SolutionFileName = "[solution.Name]_[target.Platform]";
     if (target.DevEnv != DevEnv.xcode4ios)
     {
         conf.SolutionFileName += "_[target.DevEnv]";
     }
     if (target.BuildSystem == BuildSystem.FastBuild)
     {
         conf.Name += "_FastBuild";
     }
     conf.PlatformName = "[target.SolutionPlatformName]";
     conf.SolutionPath = System.IO.Path.Combine(Globals.TmpDirectory, "solutions");
 }
示例#10
0
        public override void ConfigureAll(Configuration conf, CommonTarget target)
        {
            base.ConfigureAll(conf, target);

            conf.SolutionFolder = "SharedLibs";

            conf.PrecompHeader = "precomp.h";
            conf.PrecompSource = "precomp.cpp";

            conf.Output = Configuration.OutputType.Dll;

            conf.Defines.Add("UTIL_DLL_EXPORT");
            conf.ExportDefines.Add("UTIL_DLL_IMPORT");

            conf.IncludePaths.Add(SourceRootPath);

            conf.AddPrivateDependency <StaticLib1Project>(target);
        }
        public static CommonTarget[] GetWin64Targets()
        {
            var defaultTarget = new CommonTarget(
                Platform.win64,
                DevEnv.vs2019,
                Optimization.Debug | Optimization.Release,
                Blob.NoBlob,
                BuildSystem.MSBuild
                );

            // make a fastbuild version of the target
            var fastBuildTarget = (CommonTarget)defaultTarget.Clone(
                Blob.FastBuildUnitys,
                BuildSystem.FastBuild
                );

            return(new[] { defaultTarget, fastBuildTarget });
        }
示例#12
0
 public virtual void ConfigureWin64(Configuration conf, CommonTarget target)
 {
     conf.Defines.Add("_HAS_EXCEPTIONS=0");
 }
示例#13
0
 public StaticLib2Project()
 {
     AddTargets(CommonTarget.GetDefaultTargets());
     Name = "static lib2";
 }
示例#14
0
 public virtual void ConfigureMSBuild(Configuration conf, CommonTarget target)
 {
     // starting with vs2019 16.10, need this to fix warning: argument unused during compilation: '/MP'
     conf.Options.Add(Options.Vc.Compiler.MultiProcessorCompilation.Disable);
 }
示例#15
0
 public HelloEventsSolution()
 {
     AddTargets(CommonTarget.GetDefaultTargets());
     Name = "HelloEvents";
 }
示例#16
0
 public Dll1Project()
 {
     AddTargets(CommonTarget.GetDefaultTargets());
     Name = "dll1";
 }
示例#17
0
 public virtual void ConfigureRelease(Configuration conf, CommonTarget target)
 {
     conf.DefaultOption = Options.DefaultTarget.Release;
 }
示例#18
0
 public virtual void ConfigureDebug(Configuration conf, CommonTarget target)
 {
     conf.DefaultOption = Options.DefaultTarget.Debug;
 }
示例#19
0
 public ExeProject()
 {
     AddTargets(CommonTarget.GetDefaultTargets());
     Name = "exe";
 }