<commit_before>-- duct++ tests premake file

--[[if _ACTION=="clean" then
	os.rmdir(outpath)
end]]

newoption {
	trigger="clang",
	description="Use Clang in-place of GCC",
}

if _OPTIONS["clang"] then
	premake.gcc.cc="clang"
	premake.gcc.cxx="clang++"
end

solution("tests")
	configurations {"debug", "release"}
	platforms {"x32", "x64"}

group=""

function setup_test(name, src)
	local outpath="out/"
	local proj=project(group.."_"..name)
	proj.language="C++"
	proj.kind="ConsoleApp"
	
	targetname(name)
	
	configuration {"debug"}
		defines {"DEBUG", "_DEBUG"}
		flags {"ExtraWarnings", "Symbols"}
	
	configuration {"release"}
		defines {"NDEBUG"}
		flags {"ExtraWarnings", "Optimize"}
	
	configuration {"linux"}
		buildoptions {"-std=c++0x", "-pedantic"}
	
	configuration {"clang"}
		links {
			"stdc++"
		}

	configuration {}
		targetdir(".")
		objdir(outpath)
		includedirs {
			"../.."
		}
		files {
			src
		}
end

-- categories<commit_msg>Added extra warning flags and -stdlib for Clang on Linux to premake script.<commit_after>-- duct++ tests premake file

--[[if _ACTION=="clean" then
	os.rmdir(outpath)
end]]

newoption {
	trigger="clang",
	description="Use Clang in-place of GCC",
}

if _OPTIONS["clang"] then
	premake.gcc.cc="clang"
	premake.gcc.cxx="clang++"
end

solution("tests")
	configurations {"debug", "release"}
	platforms {"x32", "x64"}

group=""

function setup_test(name, src)
	local outpath="out/"
	local proj=project(group.."_"..name)
	proj.language="C++"
	proj.kind="ConsoleApp"
	
	targetname(name)
	
	configuration {"debug"}
		defines {"DEBUG", "_DEBUG"}
		flags {"ExtraWarnings", "Symbols"}
	
	configuration {"release"}
		defines {"NDEBUG"}
		flags {"ExtraWarnings", "Optimize"}
	
	configuration {"linux"}
		buildoptions {
			--"-Wextra",
			"-Wunused-parameter",
			"-Wuninitialized",
			"-Wmissing-field-initializers",
			"-Wredundant-decls",
			"-Wfloat-equal"
		}
		buildoptions {"-std=c++0x", "-pedantic"}
	
	configuration {"linux" and "clang"}
		buildoptions {"-stdlib=libstdc++"}

	configuration {"clang"}
		links {
			"stdc++"
		}

	configuration {}
		targetdir(".")
		objdir(outpath)
		includedirs {
			"../.."
		}
		files {
			src
		}
end

-- categories
{'fraction_non_alphanumeric': 0.18347786398904609, 'fraction_numerical': 0.004564125969876769, 'mean_word_length': 4.097674418604651, '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': '5857251', 'n_tokens_mistral': 894, 'n_tokens_neox': 784, 'n_words': 170}