<commit_before># Copyright 2014 <NAME>.
# This file is part of SGLib.  SGLib is licensed under the terms of the
# 2-clause BSD license.  For more information, see LICENSE.txt.
from ..schema import Schema, SchemaBuilder

_VARIABLES = (SchemaBuilder(sep=';', bool_values=('false', 'true'))
    .string('Config.CharacterSet')
    .string('Config.PlatformToolset')
    .bool  ('Config.UseDebugLibraries')
    .bool  ('Config.WholeProgramOptimization')

    .list  ('VC.ExcludePath')
    .list  ('VC.ExecutablePath')
    .list  ('VC.IncludePath')
    .list  ('VC.LibraryPath')
    .list  ('VC.LibraryWPath')
    .list  ('VC.ReferencePath')
    .list  ('VC.SourcePath')
    .bool  ('VC.LinkIncremental')

    .list  ('ClCompile.AdditionalIncludeDirectories')
    .defs  ('ClCompile.PreprocessorDefinitions')
    .list  ('ClCompile.DisableSpecificWarnings')
    .bool  ('ClCompile.FunctionLevelLinking')
    .bool  ('ClCompile.IntrinsicFunctions')
    .string('ClCompile.Optimization')
    .bool  ('ClCompile.SDLCheck')
    .string('ClCompile.WarningLevel')

    .list  ('Link.AdditionalDependencies')
    .list  ('Link.AdditionalLibraryDirectories')
    .bool  ('Link.EnableCOMDATFolding')
    .bool  ('Link.GenerateDebugInformation')
    .bool  ('Link.OptimizeReferences')
    .bool  ('Link.TreatLinkerWarningAsErrors')
    .string('Link.Version')

    .string('Debug.Path')
).value()

_FLAGS = {
    #'CFLAGS':
    #'CXXFLAGS':
    #'LIBS':
}

class VisualStudioSchema(Schema):
    """A schema for Visual Studio build variables."""
    __slots__ = []

    def __init__(self):
        archs=['Win32', 'x64']
        configs=['Debug', 'Release']
        variants=['{}|{}'.format(c, a) for c in configs for a in archs]
        super(VisualStudioSchema, self).__init__(
            variables=_VARIABLES,
            archs=archs,
            configs=configs,
            variants=variants,
            flags=_FLAGS)
<commit_msg>build: fix Visual Studio schema<commit_after># Copyright 2014 <NAME>.
# This file is part of SGLib.  SGLib is licensed under the terms of the
# 2-clause BSD license.  For more information, see LICENSE.txt.
from ..schema import Schema, SchemaBuilder

_VARIABLES = (SchemaBuilder(sep=';', bool_values=('false', 'true'))
    .string('Config.CharacterSet')
    .string('Config.PlatformToolset')
    .bool  ('Config.UseDebugLibraries')
    .bool  ('Config.WholeProgramOptimization')

    .list  ('VC.ExcludePath')
    .list  ('VC.ExecutablePath')
    .list  ('VC.IncludePath')
    .list  ('VC.LibraryPath')
    .list  ('VC.LibraryWPath')
    .list  ('VC.ReferencePath')
    .list  ('VC.SourcePath')
    .bool  ('VC.LinkIncremental')

    .list  ('ClCompile.AdditionalIncludeDirectories')
    .defs  ('ClCompile.PreprocessorDefinitions')
    .list  ('ClCompile.DisableSpecificWarnings')
    .bool  ('ClCompile.FunctionLevelLinking')
    .bool  ('ClCompile.IntrinsicFunctions')
    .string('ClCompile.Optimization')
    .bool  ('ClCompile.SDLCheck')
    .string('ClCompile.WarningLevel')

    .list  ('Link.AdditionalDependencies')
    .list  ('Link.AdditionalLibraryDirectories')
    .bool  ('Link.EnableCOMDATFolding')
    .bool  ('Link.GenerateDebugInformation')
    .bool  ('Link.OptimizeReferences')
    .bool  ('Link.TreatLinkerWarningAsErrors')
    .string('Link.Version')

    .list  ('Debug.Path')
).value()

_FLAGS = {
    #'CFLAGS':
    #'CXXFLAGS':
    #'LIBS':
}

class VisualStudioSchema(Schema):
    """A schema for Visual Studio build variables."""
    __slots__ = []

    def __init__(self):
        archs=['Win32', 'x64']
        configs=['Debug', 'Release']
        variants=['{}|{}'.format(c, a) for c in configs for a in archs]
        super(VisualStudioSchema, self).__init__(
            variables=_VARIABLES,
            archs=archs,
            configs=configs,
            variants=variants,
            flags=_FLAGS)

{'fraction_non_alphanumeric': 0.1470435684647303, 'fraction_numerical': 0.00466804979253112, 'mean_word_length': 3.1697297297297298, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3283816', 'n_tokens_mistral': 1283, 'n_tokens_neox': 1188, 'n_words': 251}