add missing header

self-hosting
MoAlyousef 4 years ago
parent ddfdbe28d9
commit 4cd16c8e42

@ -5,6 +5,7 @@
#include <map> #include <map>
#include <sstream> #include <sstream>
#include <stdexcept> #include <stdexcept>
#include <string.h>
#include <toml.hpp> #include <toml.hpp>
namespace fs = std::filesystem; namespace fs = std::filesystem;
@ -41,8 +42,9 @@ void generate_project(const char *str) {
ofs2 << "[cmake]\nminimum_required = \"3.0\"\n\n[project]\nname = \"" ofs2 << "[cmake]\nminimum_required = \"3.0\"\n\n[project]\nname = \""
<< dir_name.string() << dir_name.string()
<< "\"\nversion = " << "\"\nversion = "
"\"0.1.0\"\n\n[[exe]]\nname = \"" "\"0.1.0\"\n\n[[bin]]\nname = \""
<< dir_name.string() << "\"\nsources = [\"src/main.cpp\"]\n"; << dir_name.string() << "\"\nsources = [\"src/main.cpp\"]\ntype = \"" << str
<< "\"\n";
} }
ofs2.flush(); ofs2.flush();
ofs2.close(); ofs2.close();
@ -59,7 +61,7 @@ void generate_project(const char *str) {
ofs2 << "[cmake]\nminimum_required = \"3.0\"\n\n[project]\nname = \"" ofs2 << "[cmake]\nminimum_required = \"3.0\"\n\n[project]\nname = \""
<< dir_name.string() << dir_name.string()
<< "\"\nversion = " << "\"\nversion = "
"\"0.1.0\"\n\n[[lib]]\nname = \"" "\"0.1.0\"\n\n[[bin]]\nname = \""
<< dir_name.string() << "\"\nsources = [\"src/lib.cpp\"]\ntype = \"" << str << dir_name.string() << "\"\nsources = [\"src/lib.cpp\"]\ntype = \"" << str
<< "\"\n"; << "\"\n";
} }

Loading…
Cancel
Save