<commit_before>-- Tests/examples helpers

require('vstudio')
  
function disableFastUpToDateCheck(prj, cfg)
  premake.vstudio.vc2010.element("DisableFastUpToDateCheck", nil, "true")
end
  
premake.override(premake.vstudio.cs2005.elements, "projectProperties",
  function(oldfn, prj)
    local elements = oldfn(prj)
    if (string.endswith(prj.filename, ".CSharp") and
        not string.endswith(prj.filename, ".Tests.CSharp") and
        not string.endswith(prj.filename, ".Parser.CSharp")) then 
      elements = table.join(elements, {disableFastUpToDateCheck})
    end
    return elements
  end)

premake.override(premake.vstudio.vc2010.elements, "globals",
  function(oldfn, prj, cfg)
    local elements = oldfn(prj, cfg)
    if (string.endswith(prj.filename, ".CLI") and
        not string.endswith(prj.filename, ".Tests.CLI") and
        not string.endswith(prj.filename, ".Parser.CLI") and
        prj.filename ~= "CppSharp.CLI") then 
      elements = table.join(elements, {disableFastUpToDateCheck})
    end
    return elements
  end)

-- HACK: work around gmake(2) ignoring tokens such as %{cfg.buildcfg}<commit_msg>Fix error in Tests.lua by requiring gmake2 module.<commit_after>-- Tests/examples helpers

require('vstudio')
require('gmake2')
  
function disableFastUpToDateCheck(prj, cfg)
  premake.vstudio.vc2010.element("DisableFastUpToDateCheck", nil, "true")
end
  
premake.override(premake.vstudio.cs2005.elements, "projectProperties",
  function(oldfn, prj)
    local elements = oldfn(prj)
    if (string.endswith(prj.filename, ".CSharp") and
        not string.endswith(prj.filename, ".Tests.CSharp") and
        not string.endswith(prj.filename, ".Parser.CSharp")) then 
      elements = table.join(elements, {disableFastUpToDateCheck})
    end
    return elements
  end)

premake.override(premake.vstudio.vc2010.elements, "globals",
  function(oldfn, prj, cfg)
    local elements = oldfn(prj, cfg)
    if (string.endswith(prj.filename, ".CLI") and
        not string.endswith(prj.filename, ".Tests.CLI") and
        not string.endswith(prj.filename, ".Parser.CLI") and
        prj.filename ~= "CppSharp.CLI") then 
      elements = table.join(elements, {disableFastUpToDateCheck})
    end
    return elements
  end)

-- HACK: work around gmake(2) ignoring tokens such as %{cfg.buildcfg}
{'fraction_non_alphanumeric': 0.12657130472475075, 'fraction_numerical': 0.012136974425661032, 'mean_word_length': 3.900212314225053, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '864450', 'n_tokens_mistral': 819, 'n_tokens_neox': 767, 'n_words': 161}