From a11cbcc2689ae9fd19908e046a28f6fdd6fb3c15 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 15 May 2024 16:21:36 -0400 Subject: [PATCH] cmGeneratorTarget: Add TransitiveProperty constructor to help some compilers Some compilers have trouble initializing TransitiveProperty as a parent class using an initializer list unless there is an explicit constructor: * SunPro fails to compile * XLClang seems to miscompile, exhibiting strange runtime behavior --- Source/cmGeneratorTarget.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 51f112e594..b09686cd56 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -892,6 +892,13 @@ public: struct TransitiveProperty { +#if defined(__SUNPRO_CC) || (defined(__ibmxl__) && defined(__clang__)) + TransitiveProperty(cm::string_view interfaceName, UseTo usage) + : InterfaceName(interfaceName) + , Usage(usage) + { + } +#endif cm::string_view InterfaceName; UseTo Usage; };