[ITK] [ITK-users] C++11 compiler warnings with cuda <6.5

Matt McCormick matt.mccormick at kitware.com
Tue May 31 23:02:01 EDT 2016


Hi Simon,

Thanks for reporting the issue.  From this page:

  https://devblogs.nvidia.com/parallelforall/developing-portable-cuda-cc-code-hemi/

it looks like the

__NVCC__

macro could be used in this fashion:

// Cuda does not need the same C++ standard version
#if !defined(__NVCC__)
#if ITK_COMPILED_CXX_VERSION > __cplusplus
  #warning "WARNING:  The current project is configured to use a C++
standard version older than the C++ standard used for this build of
ITK"
#endif
#endif

Could you please test and submit a patch as documented here?:

  https://itk.org/Wiki/ITK/Git/Develop

Thanks,
Matt

On Thu, May 26, 2016 at 9:44 AM, Simon Rit <simon.rit at gmail.com> wrote:
> Hi,
> I have upgraded to ITK 4.11 (compiled with gcc 5.3.1) and I now get a lot of
> warnings with my GPU code compiled with nvcc (cuda 6.5) (see RTK dashboard,
> e.g., here) due to this itkConfigure.h.in commit. I can see two workarounds:
> - disable the warning when including itkConfigure.h.in when I compile CUDA
> code. This can be done with pragmas (like explained here) but it is a bit of
> work to make it cross platform. Note that I don't fear a problem since I
> only include this ITK file to know the configuration, the rest is
> independent from ITK because, in my experience, nvcc doesn't compile ITK
> code... Are you sure this warning is required and, if yes, would there be a
> better way to disable this warning in my specific case?
> - disable c++11 when compiling ITK and RTK but that's a pity.
> Has anyone else experienced such a problem? Would there be a better
> solution?
> Thanks in advance,
> Simon
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list