Add #compileflags as an option to makegen.conf

This commit is contained in:
Thraix
2019-01-09 21:22:25 +01:00
parent 6a6b9aa9e4
commit ab3f4dfaaa
4 changed files with 20 additions and 2 deletions
+11
View File
@@ -44,6 +44,11 @@ ConfigFile ConfigFile::Load()
vec = &conf.includedirs;
loadFlag = FLAG_VECTOR;
}
else if(line == "#compileflags")
{
vec = &conf.flags;
loadFlag = FLAG_VECTOR;
}
else if(line == "#srcdirs")
{
vec = &conf.srcdirs;
@@ -155,6 +160,7 @@ ConfigFile ConfigFile::Gen()
InputMultiple("Enter include directory:", conf.includedirs,true);
InputMultiple("Enter source directories:", conf.srcdirs,true);
InputMultiple("Enter preprocessor definitions:", conf.defines,false);
InputMultiple("Enter compile flags:", conf.flags,false);
LOG_INFO("Enter output directory (default: bin):");
std::getline(std::cin, conf.outputdir);
if(conf.outputdir == "")
@@ -201,6 +207,11 @@ void ConfigFile::Save() const
{
file << *it << std::endl;
}
file << "#compileflags" << std::endl;
for(auto it = flags.begin();it!=flags.end();++it)
{
file << *it << std::endl;
}
file << "#outputdir" << std::endl;
file << outputdir << std::endl;
file << "#projectname" << std::endl;