summaryrefslogtreecommitdiffstats
path: root/Source/cmFindBase.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-06-10 17:22:18 (GMT)
committerBrad King <brad.king@kitware.com>2008-06-10 17:22:18 (GMT)
commit4543a3ea05433b45bfea317e168a61354ea20ad4 (patch)
tree1e28d62f98fca2e4529a37e0ad21757cabf007cf /Source/cmFindBase.cxx
parent13d55b6ae4e5d618893f7ae82136828c3bc754b1 (diff)
downloadCMake-4543a3ea05433b45bfea317e168a61354ea20ad4.zip
CMake-4543a3ea05433b45bfea317e168a61354ea20ad4.tar.gz
CMake-4543a3ea05433b45bfea317e168a61354ea20ad4.tar.bz2
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.
Diffstat (limited to 'Source/cmFindBase.cxx')
-rw-r--r--Source/cmFindBase.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
index 4ff14b6..5d58783 100644
--- a/Source/cmFindBase.cxx
+++ b/Source/cmFindBase.cxx
@@ -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();