I have an OS-agnostic makefile (ugh, I know) which supports both GNU and MSVC compilers (among others). It always generates .o
object files when compiling, even when compiling for MSVC (which expects .obj
files). This is not a major problem; cl
issues warning
cl : Command line warning D9024 : unrecognized source file type '.o', object file assumed
and carries on, successfully compiling.
I'd like to remove this unsightly command line warning, and only this warning, but can't figure out any way to do it.
Arguments like IGNORE don't seem to suppress it, e.g. using
cl -IGNORE:D9024 ...
and techniques (like this one) to suppress warnings generated in-code don't apply for this command line warning.
Is there any way to suppress D9024?
Otherwise (and preferably), is there a way to tell MSVC that the provided .o
files ARE object files, so that it needn't assume so?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…