BUG: In find_* commands support NO_* options in short-hand
- The short-hand forms do not document the NO_* options. - CMake 2.4 and 2.6.0 accepted them accidentally, but also treated the options as paths. - Now the options are accepted but do not become paths.
This commit is contained in:
parent
13d55b6ae4
commit
4543a3ea05
|
@ -200,7 +200,9 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
|
|||
{
|
||||
doing = DoingNone;
|
||||
compatibility = false;
|
||||
newStyle = true;
|
||||
// Some common arguments were accidentally supported by CMake
|
||||
// 2.4 and 2.6.0 in the short-hand form of the command, so we
|
||||
// must support it even though it is not documented.
|
||||
}
|
||||
else if(doing == DoingNames)
|
||||
{
|
||||
|
@ -259,11 +261,13 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
|
|||
// FIND_*(VAR name path1 path2 ...)
|
||||
if(!newStyle)
|
||||
{
|
||||
// All the short-hand arguments have been recorded as names.
|
||||
std::vector<std::string> shortArgs = this->Names;
|
||||
this->Names.clear(); // clear out any values in Names
|
||||
this->Names.push_back(args[1]);
|
||||
for(unsigned int j = 2; j < args.size(); ++j)
|
||||
this->Names.push_back(shortArgs[0]);
|
||||
for(unsigned int j = 1; j < shortArgs.size(); ++j)
|
||||
{
|
||||
this->AddUserPath(args[j], this->UserPaths);
|
||||
this->AddUserPath(shortArgs[j], this->UserPaths);
|
||||
}
|
||||
}
|
||||
this->ExpandPaths();
|
||||
|
|
Loading…
Reference in New Issue