<commit_before>#region License
// Copyright 2010-2015 <NAME>
//
// This file is part of BuildAMation.
//
// BuildAMation is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// BuildAMation is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BuildAMation.  If not, see <http://www.gnu.org/licenses/>.
#endregion // License
using C.V2.DefaultSettings;
using VisualC.V2.DefaultSettings;
namespace VisualC
{
    public static partial class NativeImplementation
    {
        public static void
        Convert(
            this C.V2.ICommonLinkerOptions options,
            Bam.Core.V2.Module module,
            Bam.Core.StringArray commandLine)
        {
            //var applicationFile = module as C.V2.ConsoleApplication;
            switch (options.OutputType)
            {
                case C.ELinkerOutput.Executable:
                    commandLine.Add(System.String.Format("-OUT:{0}", module.GeneratedPaths[C.V2.ConsoleApplication.Key].ToString()));
                    break;

                case C.ELinkerOutput.DynamicLibrary:
                    commandLine.Add("-DLL");
                    commandLine.Add(System.String.Format("-OUT:{0}", module.GeneratedPaths[C.V2.ConsoleApplication.Key].ToString()));
                    break;
            }
            foreach (var path in options.LibraryPaths)
            {
                var format = path.ContainsSpace ? "-LIBPATH:\"{0}\"" : "-LIBPATH:{0}";
                commandLine.Add(System.String.Format(format, path.ToString()));
            }
            foreach (var path in options.Libraries)
            {
                commandLine.Add(path);
            }
        }

        public static void
        Convert(
            this V2.ICommonLinkerOptions options,
            Bam.Core.V2.Module module,
            Bam.Core.StringArray commandLine)
        {
            if (options.NoLogo.GetValueOrDefault())
            {
                commandLine.Add("-NOLOGO");
            }
        }
    }

    public static partial class VSSolutionImplementation
    {
        public static void
        Convert(
            this C.V2.ICommonLinkerOptions options,
            Bam.Core.V2.Module module,
            System.Xml.XmlElement groupElement,
            string configuration)
        {
            var project = groupElement.OwnerDocument as VSSolutionBuilder.V2.VSProject;
        }

        public static void
        Convert(
            this V2.ICommonLinkerOptions options,
            Bam.Core.V2.Module module,
            System.Xml.XmlElement groupElement,
            string configuration)
        {
            var project = groupElement.OwnerDocument as VSSolutionBuilder.V2.VSProject;

            project.AddToolSetting(groupElement, "SuppressStartupBanner", options.NoLogo, configuration,
                (setting, attributeName, builder) =>
                {
                    if (options.NoLogo.GetValueOrDefault())
                    {
                        builder.Append(options.NoLogo.ToString().ToLower());
                    }
                });
        }
    }

namespace V2
{<commit_msg>[V2] VisualStudio linker settings - need to sort out different platform configurations now<commit_after>#region License
// Copyright 2010-2015 <NAME>
//
// This file is part of BuildAMation.
//
// BuildAMation is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// BuildAMation is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BuildAMation.  If not, see <http://www.gnu.org/licenses/>.
#endregion // License
using C.V2.DefaultSettings;
using VisualC.V2.DefaultSettings;
namespace VisualC
{
    public static partial class NativeImplementation
    {
        public static void
        Convert(
            this C.V2.ICommonLinkerOptions options,
            Bam.Core.V2.Module module,
            Bam.Core.StringArray commandLine)
        {
            //var applicationFile = module as C.V2.ConsoleApplication;
            switch (options.OutputType)
            {
                case C.ELinkerOutput.Executable:
                    commandLine.Add(System.String.Format("-OUT:{0}", module.GeneratedPaths[C.V2.ConsoleApplication.Key].ToString()));
                    break;

                case C.ELinkerOutput.DynamicLibrary:
                    commandLine.Add("-DLL");
                    commandLine.Add(System.String.Format("-OUT:{0}", module.GeneratedPaths[C.V2.ConsoleApplication.Key].ToString()));
                    break;
            }
            foreach (var path in options.LibraryPaths)
            {
                var format = path.ContainsSpace ? "-LIBPATH:\"{0}\"" : "-LIBPATH:{0}";
                commandLine.Add(System.String.Format(format, path.ToString()));
            }
            foreach (var path in options.Libraries)
            {
                commandLine.Add(path);
            }
        }

        public static void
        Convert(
            this V2.ICommonLinkerOptions options,
            Bam.Core.V2.Module module,
            Bam.Core.StringArray commandLine)
        {
            if (options.NoLogo.GetValueOrDefault())
            {
                commandLine.Add("-NOLOGO");
            }
        }
    }

    public static partial class VSSolutionImplementation
    {
        public static void
        Convert(
            this C.V2.ICommonLinkerOptions options,
            Bam.Core.V2.Module module,
            System.Xml.XmlElement groupElement,
            string configuration)
        {
            var project = groupElement.OwnerDocument as VSSolutionBuilder.V2.VSProject;

            project.AddToolSetting(groupElement, "OutputFile", options.OutputType, configuration,
                (setting, attributeName, builder) =>
                {
                    switch (setting)
                    {
                        case C.ELinkerOutput.Executable:
                            {
                                var outPath = module.GeneratedPaths[C.V2.ConsoleApplication.Key].ToString();
                                builder.Append(System.String.Format("$(OutDir)\\{0}", System.IO.Path.GetFileName(outPath)));
                            }
                            break;

                        case C.ELinkerOutput.DynamicLibrary:
                            {
                                var outPath = module.GeneratedPaths[C.V2.DynamicLibrary.Key].ToString();
                                builder.Append(System.String.Format("$(OutDir)\\{0}", System.IO.Path.GetFileName(outPath)));
                            }
                            break;
                    }
                });
            if (C.ELinkerOutput.DynamicLibrary == options.OutputType)
            {
                project.AddToolSetting(groupElement, "ImportLibrary", options.OutputType, configuration,
                    (setting, attributeName, builder) =>
                    {
                        var outPath = module.GeneratedPaths[C.V2.DynamicLibrary.ImportLibraryKey].ToString();
                        builder.Append(System.String.Format("$(IntDir)\\{0}", System.IO.Path.GetFileName(outPath)));
                    });
            }

            if (options.LibraryPaths.Count > 0)
            {
                project.AddToolSetting(groupElement, "AdditionalLibraryDirectories", options.LibraryPaths, configuration,
                    (setting, attributeName, builder) =>
                    {
                        foreach (var path in options.LibraryPaths)
                        {
                            builder.AppendFormat("{0};", path);
                        }
                    });
            }
            if (options.Libraries.Count > 0)
            {
                project.AddToolSetting(groupElement, "AdditionalDependencies", options.Libraries, configuration,
                    (setting, attributeName, builder) =>
                    {
                        foreach (var path in options.Libraries)
                        {
                            builder.AppendFormat("{0};", path);
                        }
                    });
            }
        }

        public static void
        Convert(
            this V2.ICommonLinkerOptions options,
            Bam.Core.V2.Module module,
            System.Xml.XmlElement groupElement,
            string configuration)
        {
            var project = groupElement.OwnerDocument as VSSolutionBuilder.V2.VSProject;

            project.AddToolSetting(groupElement, "SuppressStartupBanner", options.NoLogo, configuration,
                (setting, attributeName, builder) =>
                {
                    if (options.NoLogo.GetValueOrDefault())
                    {
                        builder.Append(options.NoLogo.ToString().ToLower());
                    }
                });
        }
    }

namespace V2
{
{'fraction_non_alphanumeric': 0.09010673234811166, 'fraction_numerical': 0.00708128078817734, 'mean_word_length': 1.5800900185332274, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3311176', 'n_tokens_mistral': 2398, 'n_tokens_neox': 2299, 'n_words': 559}