[CMake] Re: bug ADD_DEFINITIONS

Peter Kümmel syntheticpp at gmx.net
Thu Jun 8 17:35:36 EDT 2006


Jan Woetzel wrote:
> Jan Woetzel wrote:
> 
>>> SET_SOURCE_FILES_PROPERTIES( ${FN2}  PROPERTIES COMPILE_FLAGS
>>
> 
> By the way,
> ADD_DEFINTIONS has another bug in Visual Studio 7.1 generator,
> see my bug report 3354
> 
> Example:
> ADD_DEFINTIONS( -foo )
> adds
> /D "-foo"
> instead of
> -foo
> 
> Still talking about cmake 2.4.2 on Windows with MSVS .net 2003 generator.
> 
> Jan.
> 
As I understand it ADD_DEFINTIONS is only for macro definitions and
not for flags in general.

use e.g:
SET(CMAKE_CXX_FLAGS_DEBUG "-wd4996 -wd4800")

Peter


More information about the CMake mailing list