[CMake] Warning D9025 : overriding '/W3' with '/W4'

Mateusz Loskot mateusz at loskot.net
Mon Jan 18 19:00:18 EST 2010


Hi,

In CMakeLists.txt I have something like this:

if(MSVC)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()

I configure my build using command prompt of Visual Studio 2005 (8.0):

D:\dev\geos\_svn\build-nmake>cmake -G "NMake Makefiles" ..\trunk

and the compiler flags look as follows:

CMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR /W4 /MP

I build and I'm getting D9025 warning:

D:\dev\geos\_svn\build-nmake> nmake

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation.  All rights reserved.

[  0%] Building CXX object src/CMakeFiles/geos.dir/algorithm/Angle.cpp.obj
cl : Command line warning D9025 : overriding '/W3' with '/W4'


Would it be possible to get rid of this warning with some CMake magic?

It is not really a big problem as one can just ignore this warning,
but I think it may indicate general issue with handling
flags for NMake makefiles.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org


More information about the CMake mailing list