<commit_before>// <copyright file="GLEW.cs" company="<NAME>">
//  Opus package
// </copyright>
// <summary>GLEW package</summary>
// <author><NAME></author>
namespace GLEW
{
    // Define module classes here
    class GLEWStatic : C.StaticLibrary
    {
        public GLEWStatic()
        {
            this.headerFiles.Include(this, "glew-1.5.7", "include", "GL", "*.h");
        }

        class SourceFiles : C.ObjectFileCollection
        {
            public SourceFiles()
            {
                this.Include(this, "glew-1.5.7", "src", "glew.c");
                //this.Add(new C.ObjectFile(new Opus.Core.File(@"glew-1.5.7/src/glewinfo.c")));
                //this.Add(new C.ObjectFile(new Opus.Core.File(@"glew-1.5.7/src/visualinfo.c")));

                this.UpdateOptions += new Opus.Core.UpdateOptionCollectionDelegate(GLEW_IncludePathAndStaticDefine);
                this.UpdateOptions += new Opus.Core.UpdateOptionCollectionDelegate(GLEW_VCWarningLevel);
                //this.UpdateOptions += new Opus.Core.UpdateOptionCollectionDelegate(GLEW_VCSecurity);
            }

            void GLEW_VCSecurity(Opus.Core.IModule module, Opus.Core.Target target)
            {
                if (module.Options is VisualCCommon.ICCompilerOptions)
                {
                    C.ICCompilerOptions compilerOptions = module.Options as C.ICCompilerOptions;
                    compilerOptions.Defines.Add("_CRT_SECURE_NO_WARNINGS");
                }
            }

            void GLEW_VCWarningLevel(Opus.Core.IModule module, Opus.Core.Target target)
            {
                VisualCCommon.ICCompilerOptions compilerOptions = module.Options as VisualCCommon.ICCompilerOptions;
                if (null != compilerOptions)
                {
                    compilerOptions.WarningLevel = VisualCCommon.EWarningLevel.Level3;
                }
            }

            [C.ExportCompilerOptionsDelegate]
            void GLEW_IncludePathAndStaticDefine(Opus.Core.IModule module, Opus.Core.Target target)
            {
                C.ICCompilerOptions compilerOptions = module.Options as C.ICCompilerOptions;
                compilerOptions.IncludePaths.Include(this, "glew-1.5.7", "include");
                compilerOptions.Defines.Add("GLEW_STATIC");
            }
        }

        [Opus.Core.SourceFiles]
        SourceFiles sourceFiles = new SourceFiles();

        [C.HeaderFiles]
        Opus.Core.FileCollection headerFiles = new Opus.Core.FileCollection();

        [Opus.Core.DependentModules]
        Opus.Core.TypeArray dependents = new Opus.Core.TypeArray(
            typeof(OpenGLSDK.OpenGL)
        );
    }
}
<commit_msg>[050dev] GLEW needs WindowsSDK's glu.h header file path.<commit_after>// <copyright file="GLEW.cs" company="<NAME>">
//  Opus package
// </copyright>
// <summary>GLEW package</summary>
// <author><NAME></author>
namespace GLEW
{
    // Define module classes here
    class GLEWStatic : C.StaticLibrary
    {
        public GLEWStatic()
        {
            this.headerFiles.Include(this, "glew-1.5.7", "include", "GL", "*.h");
        }

        class SourceFiles : C.ObjectFileCollection
        {
            public SourceFiles()
            {
                this.Include(this, "glew-1.5.7", "src", "glew.c");
                //this.Add(new C.ObjectFile(new Opus.Core.File(@"glew-1.5.7/src/glewinfo.c")));
                //this.Add(new C.ObjectFile(new Opus.Core.File(@"glew-1.5.7/src/visualinfo.c")));

                this.UpdateOptions += new Opus.Core.UpdateOptionCollectionDelegate(GLEW_IncludePathAndStaticDefine);
                this.UpdateOptions += new Opus.Core.UpdateOptionCollectionDelegate(GLEW_VCWarningLevel);
                //this.UpdateOptions += new Opus.Core.UpdateOptionCollectionDelegate(GLEW_VCSecurity);
            }

            void GLEW_VCSecurity(Opus.Core.IModule module, Opus.Core.Target target)
            {
                if (module.Options is VisualCCommon.ICCompilerOptions)
                {
                    C.ICCompilerOptions compilerOptions = module.Options as C.ICCompilerOptions;
                    compilerOptions.Defines.Add("_CRT_SECURE_NO_WARNINGS");
                }
            }

            void GLEW_VCWarningLevel(Opus.Core.IModule module, Opus.Core.Target target)
            {
                VisualCCommon.ICCompilerOptions compilerOptions = module.Options as VisualCCommon.ICCompilerOptions;
                if (null != compilerOptions)
                {
                    compilerOptions.WarningLevel = VisualCCommon.EWarningLevel.Level3;
                }
            }

            [C.ExportCompilerOptionsDelegate]
            void GLEW_IncludePathAndStaticDefine(Opus.Core.IModule module, Opus.Core.Target target)
            {
                C.ICCompilerOptions compilerOptions = module.Options as C.ICCompilerOptions;
                compilerOptions.IncludePaths.Include(this, "glew-1.5.7", "include");
                compilerOptions.Defines.Add("GLEW_STATIC");
            }
        }

        [Opus.Core.SourceFiles]
        SourceFiles sourceFiles = new SourceFiles();

        [C.HeaderFiles]
        Opus.Core.FileCollection headerFiles = new Opus.Core.FileCollection();

        [Opus.Core.DependentModules]
        Opus.Core.TypeArray dependents = new Opus.Core.TypeArray(
            typeof(OpenGLSDK.OpenGL)
        );

        [Opus.Core.DependentModules(Platform = Opus.Core.EPlatform.Windows)]
        Opus.Core.TypeArray winDependents = new Opus.Core.TypeArray(
            typeof(WindowsSDK.WindowsSDK)
        );
    }
}

{'fraction_non_alphanumeric': 0.10649441340782123, 'fraction_numerical': 0.006110335195530726, 'mean_word_length': 1.887600806451613, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1433940', 'n_tokens_mistral': 1676, 'n_tokens_neox': 1572, 'n_words': 236}