diff --git a/shared.h b/shared.h index 58848f7..ef3038f 100644 --- a/shared.h +++ b/shared.h @@ -11,7 +11,11 @@ // TODO: we should test on C++ compilers too #if defined(_MSC_VER) -# define nob_cc_flags(cmd) cmd_append(cmd, "/W4", "/nologo", "/D_CRT_SECURE_NO_WARNINGS", "-I.") +# if !defined(__clang__) +# define nob_cc_flags(cmd) cmd_append(cmd, "/W4", "/nologo", "/D_CRT_SECURE_NO_WARNINGS", "-I.") +# else +# define nob_cc_flags(cmd) cmd_append(cmd, "-Wall", "-Wextra", "-Wswitch-enum", "-std=c99", "-g", "-D_CRT_SECURE_NO_WARNINGS", "-I.") +# endif #elif defined(__APPLE__) || defined(__MACH__) // TODO: "-std=c99", "-D_POSIX_C_SOURCE=200112L" didn't work for MacOS, don't know why, don't really care that much at the moment. // Anybody who does feel free to investigate.