[CMake] Re: bug ADD_DEFINITIONS

Jan Woetzel jw at mip.informatik.uni-kiel.de
Fri Jun 9 03:39:52 EDT 2006


Peter Kümmel 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.
>>    
>>
>As I understand it ADD_DEFINTIONS is only for macro definitions and
>not for flags in general.
>  
>
(1) The 2.4.2 docu states:
"Adds flags to command line of C and C++ compilers. This command can be 
used to add any flag to a compile line, but the -D flag is accepted most 
C/C++ compilers. Other flags may not be as portable."

(2) It works as expecetd with gnu makefils generators (Linux gnu make 
and windows nmake), only MSVS 2003 generator adds the extra /D and 
quotes in front.


>SET(CMAKE_CXX_FLAGS_DEBUG "-wd4996 -wd4800")
>  
>
I think that does not work with different flags for each subdirectory - 
but I will try.

Jan.

-- 

  Dipl.-Ing. Jan Woetzel
--------------------------------------------------
  University of Kiel
  Institute of Computer Science and Applied Mathematics
  Hermann-Rodewald-Str. 3 [room 310]
  24098 Kiel/Germany
--------------------------------------------------
  Phone +49-431-880-4477
  Fax   +49-431-880-4054
  Mob.  +49-179-2937346
--------------------------------------------------
  Url   www.mip.informatik.uni-kiel.de/~jw
  Email jw at mip.informatik.uni-kiel.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060609/f9618262/attachment-0001.html


More information about the CMake mailing list