// Copyright (c) Ubisoft. All Rights Reserved.
// Licensed under the Apache 2.0 License. See LICENSE.md in the project root for license information.
using System;
using System.Collections.Generic;
namespace Sharpmake.Generators.FastBuild
{
//
// TODO: Streamline this with the Vcxproj interfaces. There is no reason why BFF and VCXPROJ
// generation need to specify twice the platform defines, why both have to specify
// whether it takes a lib- prefix before libraries, etc. Furthermore, these interfaces
// should be about providing the information required to generate the files, and less
// about participating in the generation.
//
///
/// Interface that exposes the required methods and properties to generate a .bff file for
/// FastBuild using Sharpmake.
///
public interface IPlatformBff
{
///
/// Gets the main `#define` symbol for that platform in the BFF file.
///
///
/// Note that this is *NOT* the C or C++ define symbol. The BFF scripts support the
/// `#define` instruction, and this property returns a symbol that tells the scripts
/// whether we're dealing with a given platform.
///
string BffPlatformDefine { get; }
///
/// Gets a configuration name for that platform in the .bff file for the code files that
/// are written in native C code.
///
string CConfigName(Configuration conf);
///
/// Gets a configuration name for that platform in the .bff file for the code files that
/// are written in native C++ code.
///
string CppConfigName(Configuration conf);
void SelectPreprocessorDefinitionsBff(IBffGenerationContext context);
void SelectAdditionalCompilerOptionsBff(IBffGenerationContext context);
///
/// Setups extra linker settings for linking with that platform.
///
/// A for writing the file.
/// The project configuration
/// The file name of the build output.
void SetupExtraLinkerSettings(IFileGenerator fileGenerator, Project.Configuration configuration, string fastBuildOutputFile);
///
/// Get the extra list of build steps to execute for this platform.
///
/// The project configuration
/// The file name of the build output.
/// The list of post build step to execute.
IEnumerable GetExtraPostBuildEvents(Project.Configuration configuration, string fastBuildOutputFile);
///
/// Get the extra list of stamp steps to execute for this platform.
///
/// The project configuration
/// The file name of the build output.
/// The list of stamp step to execute.
IEnumerable GetExtraStampEvents(Project.Configuration configuration, string fastBuildOutputFile);
///
/// Get the linker output name for this platform.
///
/// The project output type
/// The original file name of the build output.
/// The final file name of the build output.
string GetOutputFilename(Project.Configuration.OutputType outputType, string fastBuildOutputFile);
void AddCompilerSettings(
IDictionary masterCompilerSettings,
Project.Configuration conf);
}
}