Sorry disregard my previous mail...
My problem was actually different and the attached patch didn't work...

Regards,
 Daniele

On 23/09/13 10:27, Daniele E. Domenichelli wrote:
> Hello,
> 
> CheckStructHasMember does not support C++ only structs. If headers
> required to check if a struct has a member can be compiled with C++
> compiler only, the check will fail, because the C compiler will fail. As
> a consequence, the result variable is set to false, even if the struct
> has that particular member.
> 
> The attached patch adds 2 new macros:
>  - CHECK_CXX_STRUCT_HAS_MEMBER (similar to CHECK_STRUCT_HAS_MEMBER but
> uses the C++ compiler)
>  - CHECK_C_STRUCT_HAS_MEMBER (identical to CHECK_STRUCT_HAS_MEMBER,
> added for symmetry)
> that can be used to check a struct, choosing the compiler to use.
> 
> I'm not sure if this is the right way to fix this (i.e. if
> CHECK_C_STRUCT_HAS_MEMBER is required), or if it is a better idea to add
> a parameter to the existing macro.
> What do you think?
> 
> 
> Cheers,
>  Daniele
> 

--

Powered by www.kitware.com

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

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to