1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-18 06:50:27 +00:00

mymake:: added an option -v to view the commandline

This commit is contained in:
Zeno Rogue 2021-03-07 14:18:58 +01:00
parent d8fd187986
commit 6fbccbeda0

View File

@ -31,6 +31,8 @@ string compiler;
string linker;
string libs;
bool verbose = false;
int batch_size = thread::hardware_concurrency() + 1;
bool mingw64 = false;
@ -115,6 +117,9 @@ string obj_dir = "mymake_files";
string setdir = "../";
int system(string cmdline) {
if(verbose) {
printf("%s\n", cmdline.c_str());
}
if (mingw64)
cmdline = "sh -c '" + cmdline + "'"; // because system(arg) passes arg to cmd.exe on MinGW
return system(cmdline.c_str());
@ -143,6 +148,9 @@ int main(int argc, char **argv) {
if(!isalnum(c)) obj_dir += "_";
else obj_dir += c;
}
else if(s == "-v") {
verbose = true;
}
else if(s == "-mingw64") {
set_os("mingw64");
obj_dir += "/mingw64";