[Insight-developers] Conditional inclusion of headers in HeaderTests

Johnson, Hans J hans-johnson at uiowa.edu
Wed Aug 31 11:02:08 EDT 2011


Bill,

I need a variant of my approach to avoid defining that variable 2 times.    I am going to add a compile time switch

set_target_properties( ${_test_name} PROPERTIES COMPILE_FLAGS -DITK_SILENT_HEADER_ERRORS=1 )

And then protect the issuing of the compiler error with that additional flag.

Hans


From: Bill Lorensen <bill.lorensen at gmail.com<mailto:bill.lorensen at gmail.com>>
Date: Wed, 31 Aug 2011 10:56:20 -0400
To: Matt McCormick <matt.mccormick at kitware.com<mailto:matt.mccormick at kitware.com>>
Cc: Hans Johnson <hans-johnson at uiowa.edu<mailto:hans-johnson at uiowa.edu>>, ITK <insight-developers at itk.org<mailto:insight-developers at itk.org>>
Subject: Re: Conditional inclusion of headers in HeaderTests

Matt and Hans,

Please ignore this message. Looks like Hans has already addressed it in Patch 3 which I wiped out with Patch 4 and he reinstated in Patch 6...

Bill

On Wed, Aug 31, 2011 at 10:47 AM, Bill Lorensen <bill.lorensen at gmail.com<mailto:bill.lorensen at gmail.com>> wrote:
Matt,

This gerrit topic:
http://review.source.kitware.com/#change,2597

has some tests that are conditionally included if ITKV3_COMPATIBILITY is ON. However, if ITKV3_COMPATIBILITY is OFF, there are compile errors since the auto header test generator is including files whether ITKV3_COMPATIBILITY is ON of OFF. Is there a way to conditionally include headers in the auto generated header tests?

Bill




________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110831/bbf07606/attachment.htm>


More information about the Insight-developers mailing list