diff options
Diffstat (limited to 'test/cc-msvc.c')
-rw-r--r-- | test/cc-msvc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/cc-msvc.c b/test/cc-msvc.c index 10afc63..45feff8 100644 --- a/test/cc-msvc.c +++ b/test/cc-msvc.c @@ -5,12 +5,15 @@ int main(int argc, const char* argv[]) { int cpp = 0; const char* msc_ver = "1600"; + const char* msvc_lang = 0; int i; for (i = 1; i < argc; ++i) { if (strncmp(argv[i], "--cc-define=", 12) == 0) { fprintf(stdout, "\n#define %s 1", argv[i]+12); } else if (strncmp(argv[i], "-msc=", 5) == 0) { msc_ver = argv[i]+5; + } else if (strncmp(argv[i], "-msvc_lang=", 8) == 0) { + msvc_lang = argv[i]+11; } else if (strstr(argv[i], ".cpp")) { cpp = 1; } @@ -26,6 +29,11 @@ int main(int argc, const char* argv[]) fprintf(stdout, "#define _MSC_VER %s\n", msc_ver ); + if(msvc_lang) { + fprintf(stdout, + "#define _MSVC_LANG %s\n", msvc_lang + ); + } fprintf(stdout, "#define __has_include(x) x\n" "#define __has_include_next(x) x\n" |