The Meson Build System http://mesonbuild.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
477 B

#include <iostream>
#include <fstream>
using namespace std;
int main(int argc, const char *argv[]) {
if(argc < 2) {
cerr << argv[0] << " requires an output file!" << endl;
return 1;
}
ofstream out1(string(argv[1]) + ".hpp");
ofstream out2(string(argv[1]) + ".cpp");
out1 << R"(
#pragma once
#include <string>
std::string getStr();
)";
out2 << R"(
#include ")" << argv[1] << R"(.hpp"
std::string getStr() {
return "Hello World";
}
)";
return 0;
}