Browse Source

cmGeneratorTarget: synthetic targets don't have output either

Ben Boeckel 2 years ago
parent
commit
dadaa28638
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Source/cmGeneratorTarget.cxx

+ 5 - 0
Source/cmGeneratorTarget.cxx

@@ -7115,6 +7115,11 @@ cmGeneratorTarget::OutputInfo const* cmGeneratorTarget::GetOutputInfo(
     return nullptr;
     return nullptr;
   }
   }
 
 
+  // Synthetic targets don't have output.
+  if (this->IsSynthetic()) {
+    return nullptr;
+  }
+
   // Only libraries and executables have well-defined output files.
   // Only libraries and executables have well-defined output files.
   if (!this->HaveWellDefinedOutputFiles()) {
   if (!this->HaveWellDefinedOutputFiles()) {
     std::string msg = cmStrCat("cmGeneratorTarget::GetOutputInfo called for ",
     std::string msg = cmStrCat("cmGeneratorTarget::GetOutputInfo called for ",