<commit_before>newoption {
	trigger = "UWP",
	description = "Generates Universal Windows Platform application type",
}

newoption {
	trigger = "DX12",
	description = "Generates a sample for DirectX12",
}

if not _ACTION then
	_ACTION="vs2017"
end

outFolderRoot = "Bin/" .. _ACTION .. "/";

isVisualStudio = false
isUWP = false

if _ACTION == "vs2010" or _ACTION == "vs2012" or _ACTION == "vs2015" or _ACTION == "vs2017" then
	isVisualStudio = true
end

if _OPTIONS["UWP"] then
	isUWP = true
end

if isUWP then
	premake.vstudio.toolset = "v140"
	premake.vstudio.storeapp = "10.0"
end

outputFolder = "Build/" .. _ACTION

if isUWP then
	outputFolder = outputFolder .. "_UWP"
end

solution "Brofiler"
	language "C++"
if _ACTION == "vs2017" then
	windowstargetplatformversion "10.0.17134.0"
end
	startproject "ConsoleApp"

	location ( outputFolder )
	flags { "NoManifest", "ExtraWarnings", "Unicode" }
	optimization_flags = { "OptimizeSpeed" }

if isVisualStudio then
	debugdir (outFolderRoot)
	buildoptions { 
		"/wd4127", -- Conditional expression is constant
		"/wd4091"  -- 'typedef ': ignored on left of '' when no variable is declared
	}
end

if isUWP then
	defines { "BRO_UWP=1" }
end

	defines { "USE_BROFILER=1"}
	defines { "BRO_FIBERS=1"}

	local config_list = {
		"Release",
		"Debug",
	}

	local platform_list = {
		"x32",
		"x64",
		"Native",
	}

	configurations(config_list)
	platforms(platform_list)


-- CONFIGURATIONS

if _ACTION == "vs2010" then
defines { "_DISABLE_DEPRECATE_STATIC_CPPLIB", "_STATIC_CPPLIB"}
end

configuration "Release"
	targetdir(outFolderRoot .. "/Native/Release")
	defines { "NDEBUG", "MT_INSTRUMENTED_BUILD" }
	flags { "Symbols", optimization_flags }

configuration "Debug"
	targetdir(outFolderRoot .. "/Native/Debug")
	defines { "_DEBUG", "_CRTDBG_MAP_ALLOC", "MT_INSTRUMENTED_BUILD", "_ITERATOR_DEBUG_LEVEL=1"}
	flags { "Symbols" }

--  give each configuration/platform a unique output directory

for _, config in ipairs(config_list) do
	for _, plat in ipairs(platform_list) do
		configuration { config, plat }
		objdir    ( outputFolder .. "/Temp/" )
                tgtDir = outFolderRoot .. plat .. "/" .. config<commit_msg>Removing ITERATOR_DEBUG_LEVEL from debug config<commit_after>newoption {
	trigger = "UWP",
	description = "Generates Universal Windows Platform application type",
}

newoption {
	trigger = "DX12",
	description = "Generates a sample for DirectX12",
}

if not _ACTION then
	_ACTION="vs2017"
end

outFolderRoot = "Bin/" .. _ACTION .. "/";

isVisualStudio = false
isUWP = false

if _ACTION == "vs2010" or _ACTION == "vs2012" or _ACTION == "vs2015" or _ACTION == "vs2017" then
	isVisualStudio = true
end

if _OPTIONS["UWP"] then
	isUWP = true
end

if isUWP then
	premake.vstudio.toolset = "v140"
	premake.vstudio.storeapp = "10.0"
end

outputFolder = "Build/" .. _ACTION

if isUWP then
	outputFolder = outputFolder .. "_UWP"
end

solution "Brofiler"
	language "C++"
if _ACTION == "vs2017" then
	windowstargetplatformversion "10.0.17134.0"
end
	startproject "ConsoleApp"

	location ( outputFolder )
	flags { "NoManifest", "ExtraWarnings", "Unicode" }
	optimization_flags = { "OptimizeSpeed" }

if isVisualStudio then
	debugdir (outFolderRoot)
	buildoptions { 
		"/wd4127", -- Conditional expression is constant
		"/wd4091"  -- 'typedef ': ignored on left of '' when no variable is declared
	}
end

if isUWP then
	defines { "BRO_UWP=1" }
end

	defines { "USE_BROFILER=1"}
	defines { "BRO_FIBERS=1"}

	local config_list = {
		"Release",
		"Debug",
	}

	local platform_list = {
		"x32",
		"x64",
		"Native",
	}

	configurations(config_list)
	platforms(platform_list)


-- CONFIGURATIONS

if _ACTION == "vs2010" then
defines { "_DISABLE_DEPRECATE_STATIC_CPPLIB", "_STATIC_CPPLIB"}
end

configuration "Release"
	targetdir(outFolderRoot .. "/Native/Release")
	defines { "NDEBUG", "MT_INSTRUMENTED_BUILD" }
	flags { "Symbols", optimization_flags }

configuration "Debug"
	targetdir(outFolderRoot .. "/Native/Debug")
	defines { "_DEBUG", "_CRTDBG_MAP_ALLOC", "MT_INSTRUMENTED_BUILD" }
	flags { "Symbols" }

--  give each configuration/platform a unique output directory

for _, config in ipairs(config_list) do
	for _, plat in ipairs(platform_list) do
		configuration { config, plat }
		objdir    ( outputFolder .. "/Temp/" )
                tgtDir = outFolderRoot .. plat .. "/" .. config
{'fraction_non_alphanumeric': 0.1239060340856748, 'fraction_numerical': 0.02878857669276831, 'mean_word_length': 4.188769414575866, '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': '3242928', 'n_tokens_mistral': 1653, 'n_tokens_neox': 1522, 'n_words': 390}