Search code examples
nmake

nmake: is it possible to disable compilation warnings?


Microsoft nmake tool will output any compiler warnings during build process. This is very annoying while building large projects (like Qt). Is it possible to disable warnings display while using nmake?


Solution

  • Not nmake is showing you the warnings, but the compiler/tools/scripts that are used. So you have to look into your Makefile, find out which programs nmake is calling and look into their documentation about the command line options of this tools. For example, for the Microsoft C++ command line compiler cl, you can add "/w" to disable all warnings. cl /? will show you the list of available options. For other programs, other command line options may be appropriate.

    If you really do not like to see any output, you can call

    nmake >nul: 2>nul:
    

    sending all output to nirwana, but I am pretty sure that is not what you want.