Browse Source

Merge topic 'install-export-error-on-empty'

b9f3adb0a6 install(EXPORT): Fail earlier if EXPORT is missing

Acked-by: Kitware Robot <[email protected]>
Merge-request: !11301
Brad King 6 days ago
parent
commit
373d9db66f
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Source/cmInstallCommand.cxx

+ 5 - 0
Source/cmInstallCommand.cxx

@@ -2076,6 +2076,11 @@ bool HandleExportMode(std::vector<std::string> const& args,
     return false;
   }
 
+  if (exp.empty()) {
+    status.SetError(cmStrCat(args[0], " missing EXPORT."));
+    return false;
+  }
+
   // Make sure there is a destination.
   if (ica.GetDestination().empty()) {
     // A destination is required.