I build my project with MS Build Tools. Previously, I had been using the default VS generator. But now I have tried nmake JOM Makefiles generator and get the warning cl : Command line warning D9025 : overriding '/W3' with '/W4
-- as I have cmake_minimum_required(VERSION 3.14)
in my CMakeLists.txt
.
However, this warning appeared only on the first build. Then it disappeared. I tried to clean the build of course and removed all the AppData/Local/Temp
files. I encoutered this warning a couple of more times when building my project but could not spot the cue. What can be thereason of such a strange behvior. Is there any cache some where for MS Build Tools?
I need to understand this to be able to correct my CMakeLists.txt
and check that nobody gets the warning when building my project.
UPDATE:
I noticed that this happens when I change something in my CMakeLists.txt and then run cmake --build <dir>
.
Then I get:
cl ... /DWIN32 /D_WINDOWS /W3 /GR /EHsc /EHsc /W4 /WX /Zi /Ob0 /Od /RTC1 -MTd -UUNICODE -U_UNICODE /showIncludes /FoCMakeFiles\project.dir\main.cpp.obj /FdCMakeFiles\project.dir\ /FS -c C:\project\main.cpp
cl : Command line warning D9025 : overriding '/W3' with '/W4'
My project contains /EHsc /W4 /WX
flags.
However, I do not add /W3 /GR
and an extra /EHsc
anywhere.