summaryrefslogtreecommitdiffstats
path: root/Source/cmFindBase.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-09-24 15:05:10 (GMT)
committerBrad King <brad.king@kitware.com>2012-09-25 21:08:08 (GMT)
commit66759eea5e90d4af96fd79e2e9017cb2141f5415 (patch)
tree3660641b55e540e5030801888a02a355bd94b323 /Source/cmFindBase.cxx
parent9cb68b1cd408165d00449c2fed80f2f156d2b80b (diff)
downloadCMake-66759eea5e90d4af96fd79e2e9017cb2141f5415.zip
CMake-66759eea5e90d4af96fd79e2e9017cb2141f5415.tar.gz
CMake-66759eea5e90d4af96fd79e2e9017cb2141f5415.tar.bz2
find_library: Optionally consider all names in each directory
When more than one value is given to the NAMES option this command by default will consider one name at a time and search every directory for it. Add a NAMES_PER_DIR option to tell this command to consider one directory at a time and search for all names in it.
Diffstat (limited to 'Source/cmFindBase.cxx')
-rw-r--r--Source/cmFindBase.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
index a54bf7c..1de3982 100644
--- a/Source/cmFindBase.cxx
+++ b/Source/cmFindBase.cxx
@@ -15,6 +15,8 @@ cmFindBase::cmFindBase()
{
this->AlreadyInCache = false;
this->AlreadyInCacheWithoutMetaInfo = false;
+ this->NamesPerDir = false;
+ this->NamesPerDirAllowed = false;
}
//----------------------------------------------------------------------------
@@ -213,6 +215,19 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
compatibility = false;
newStyle = true;
}
+ else if (args[j] == "NAMES_PER_DIR")
+ {
+ doing = DoingNone;
+ if(this->NamesPerDirAllowed)
+ {
+ this->NamesPerDir = true;
+ }
+ else
+ {
+ this->SetError("does not support NAMES_PER_DIR");
+ return false;
+ }
+ }
else if (args[j] == "NO_SYSTEM_PATH")
{
doing = DoingNone;