cmake HAVE_ATTRIBUTE_ examples

gemrb/gemrb cmake/Helpers.cmake :31

CHECK_CXX_SOURCE_COMPILES("
		#ifdef __has_attribute
		#  if __has_attribute(${ATTRIBUTE})
		#    define ATTR __attribute__((${ATTRIBUTE}))
		#  endif
		#endif
		#ifndef ATTR
		#  define ATTR definitely-not-an-attribute
		#endif

		int test() ATTR;
		int main(int, char**) {
			return 0;
		}" HAVE_ATTRIBUTE_${ATTR_UPPER}
	)