[Cmake] RE: suppressing warnings on bcc

Wheeler, Frederick W (Research) wheeler at crd.ge.com
Tue, 24 Feb 2004 10:29:30 -0500


CMake List:

In VXL we're having a small problem turning off certain Borland warnings for
a certain file.  You can see below how Ian added the -w-8004 option for the
file file_formats/vil_dicom.cxx.  This had no effect.  The reason seems to
be the command line option order.

The CMake generated Makefile stanza for this file is below.  You'll see the
-w-8004 option twice --- I added in the 2nd one by hand.  When I add in the
2nd one, right after the -waus option that was already present, the warnings
are suppressed as desired.

There are other places in VXL where we suppress Borland warnings using this
mechanism, which works fine:
  IF (BORLAND)
    SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-8004")
  ENDIF (BORLAND)

Any suggestions?  Is there a way to get SET_SOURCE_FILES_PROPERTIES to add a
compiler option more toward the end of the command line?

Thanks,
Fred Wheeler

#---------------------------------------------------------
# object file
#
 
vil_dicom.obj:
C:\cygwin\tmp\vxl_nightly_borland\vxl_src\core\vil\file_formats\\
vil_dicom.cxx
         at echo Building object file vil_dicom.obj...
bcc32   at &&|
-DWIN32 -P   -w-8004   -w- -whid -waus -w-8004 -wpar -tWM -O2
$(INCLUDE_FLAGS) \
  -ovil_dicom.obj -c
C:\cygwin\tmp\vxl_nightly_borland\vxl_src\core\vil\file_fo\
rmats\vil_dicom.cxx
|



> -----Original Message-----
> From: Ian Scott [mailto:ian.m.scott at stud.man.ac.uk]
> Sent: Tuesday, February 24, 2004 9:30 AM
> To: Fred Wheeler (E-mail)
> Subject: suppressing warnings on bcc
> 
> 
> Hi Fred,
> 
> I put some settings in vil CMakeLists.txt file to disable all 
> the warnings
> that bcc is finding in the dcmtk headers.
> 
> IF (BORLAND)
>   IF (HAS_DCMTK)
>     # avoid warnings in dcmtk include files about variables that are
>     # assigned a value, but never used. We don't want to 
> maintain dcmtk
>     SET_SOURCE_FILES_PROPERTIES(file_formats/vil_dicom.cxx PROPERTIES
> COMPILE_FLAGS -w-8004)
>   ENDIF (HAS_DCMTK)
> ENDIF (BORLAND)
> 
> Judging by the latest Borland builds on the dashboard, it is having no
> effect, e.g.
> http://www.cs.rpi.edu/research/vision/vxl/Testing/Sites/crd.ge
.com/Win2k_bcc
-5.5.1_Release/20040224-0300-Nightly/BuildWarning.html#4127

Any suggestions?

Ian.