find_package: print error if an invalid CONFIGS name is used

In commit 41c2895b (Added version support to Config mode of find_package
command, 2008-01-28) the error message was computed but was not
reported.  Add the SetError call to report it.
This commit is contained in:
Alex Neundorf 2012-02-17 11:43:27 +01:00 committed by Brad King
parent d03606a19c
commit b3f9fe42f9
1 changed files with 1 additions and 0 deletions

View File

@ -538,6 +538,7 @@ bool cmFindPackageCommand
e << "given CONFIGS option followed by invalid file name \""
<< args[i] << "\". The names given must be file names without "
<< "a path and with a \".cmake\" extension.";
this->SetError(e.str().c_str());
return false;
}
this->Configs.push_back(args[i]);