Example #1
0
        /// <summary>
        /// Adds a build product and its associated debug file to a receipt.
        /// </summary>
        /// <param name="OutputFile">Build product to add</param>
        /// <param name="OutputType">The type of built product</param>
        /// <param name="DebugExtensions">Extensions for the matching debug file (may be null).</param>
        /// <param name="BuildProducts">Map of build products to their type</param>
        /// <param name="ToolChain">The toolchain used to build these binaries</param>
        /// <param name="bCreateDebugInfo">Whether creating debug info is enabled</param>
        static void AddBuildProductAndDebugFiles(FileReference OutputFile, BuildProductType OutputType, string[] DebugExtensions, Dictionary <FileReference, BuildProductType> BuildProducts, UEToolChain ToolChain, bool bCreateDebugInfo)
        {
            BuildProducts.Add(OutputFile, OutputType);

            foreach (string DebugExtension in DebugExtensions)
            {
                if (!String.IsNullOrEmpty(DebugExtension) && ToolChain.ShouldAddDebugFileToReceipt(OutputFile, OutputType) && bCreateDebugInfo)
                {
                    // @todo this could be cleaned up if we replaced Platform.GetDebugExtensions() with ToolChain.GetDebugFiles(OutputFile)
                    // would need care in MacToolchain tho, so too risky for now
                    BuildProducts.Add(ToolChain.GetDebugFile(OutputFile, DebugExtension), BuildProductType.SymbolFile);
                }
            }
        }