From 6fbccbeda0c9561f6a3f17d74869e5fc566f33fd Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 7 Mar 2021 14:18:58 +0100 Subject: [PATCH] mymake:: added an option -v to view the commandline --- mymake.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mymake.cpp b/mymake.cpp index 519937b0..6a2573bb 100644 --- a/mymake.cpp +++ b/mymake.cpp @@ -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";