When CMake parses link.exe and rc.exe command lines, it looks for forward-slash ("/MANIFEST:NO") but not minus-sign ("-MANIFEST:NO")
I was surprised when I saw an intermittent build failure caused by manifest generation, where a virus scanner locks an executable we're building prior to manifest injection - I had disabled manifest generation, so why was this happening?
In Source/cmcmd.cxx, cmVSLink::Parse() looks for "/INCREMENTAL", "/MANIFEST", "/Fe", and "/out". In Source/cmcldeps.cxx, main() looks for "/fo". The relevant Microsoft tools all support "-" instead of "/" for these options, and the makefiles I ported into CMake used "-" for the first two options ("-INCREMENTAL:NO", "-MANIFEST:NO"). So although we were trying to disable manifest generation, CMake didn't notice this, and added a "/MANIFEST" option and called LinkIncremental. I worked around this problem by changing my makefiles to use "/INCREMENTAL:NO" and "/MANIFEST:NO", causing CMake to call LinkNonIncremental.