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
This commit is contained in:
Brad King
2024-05-15 16:21:36 -04:00
parent af59289904
commit a11cbcc268

View File

@@ -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;
};