diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 597ff783c0..e66fa8a767 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -2076,6 +2076,11 @@ bool HandleExportMode(std::vector 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.