mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-01-26 11:04:33 +00:00
install(EXPORT): Fail earlier if EXPORT is missing
Add an explicit check in `install(EXPORT)` that the export name is non-empty. Since an empty-named export set will never exist, this is always an error. Previously, however, the error would not be caught until generate time. Now an error will be produced immediately.
This commit is contained in:
parent
caef2113e6
commit
b9f3adb0a6
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user