mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-19 13:40:42 -06:00
Previously if headers required to check if a struct has a member can be
compiled with C++ compiler only, the check would fail because the C
compiler fails. As a consequence, the result variable would be set to
false, even if the struct has that particular member.
Teach CHECK_STRUCT_HAS_MEMBER to accept a new optional argument LANGUAGE
that allows one to explicitly set the compiler to use. The new
signature is therefore:
CHECK_STRUCT_HAS_MEMBER (<struct> <member> <header> <variable>
[LANGUAGE <language>])
10 lines
127 B
C
10 lines
127 B
C
#ifndef _CSHM_DUMMY_H
|
|
#define _CSHM_DUMMY_H
|
|
|
|
struct non_existent_struct;
|
|
struct struct_with_member{
|
|
int member;
|
|
};
|
|
|
|
#endif
|