소스 검색

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
Brad King 1 년 전
부모
커밋
a11cbcc268
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      Source/cmGeneratorTarget.h

+ 7 - 0
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;
   };