summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2011-07-02 15:50:05 (GMT)
committerAlex Neundorf <neundorf@kde.org>2011-07-02 15:50:05 (GMT)
commita91d662f46fd2781fc5a3b73c2d244ac6dc2a343 (patch)
tree07f0f8c48d755ec9676defc742bbaf64d348f5be /Source/cmake.cxx
parentb976e70063008c0633cb5dd4ecb1f40278c67935 (diff)
downloadCMake-a91d662f46fd2781fc5a3b73c2d244ac6dc2a343.zip
CMake-a91d662f46fd2781fc5a3b73c2d244ac6dc2a343.tar.gz
CMake-a91d662f46fd2781fc5a3b73c2d244ac6dc2a343.tar.bz2
Add find-package mode, which does nothing yet
-add command line argument --find-package and handle it, i.e. call an empty function cmake::FindPackage() -add basic help Alex
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 45927cb..3d42c7f 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -181,6 +181,7 @@ cmake::cmake()
this->ProgressCallback = 0;
this->ProgressCallbackClientData = 0;
this->ScriptMode = false;
+ this->FindPackageMode = false;
#ifdef CMAKE_BUILD_WITH_CMAKE
this->VariableWatch = new cmVariableWatch;
@@ -353,6 +354,7 @@ void cmake::RemoveUnscriptableCommands()
// Parse the args
bool cmake::SetCacheArgs(const std::vector<std::string>& args)
{
+ bool findPackageMode = false;
for(unsigned int i=1; i < args.size(); ++i)
{
std::string arg = args[i];
@@ -480,7 +482,17 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
}
this->ReadListFile(args, path.c_str());
}
+ else if (arg.find("--find-package",0) == 0)
+ {
+ findPackageMode = true;
+ }
+ }
+
+ if (findPackageMode)
+ {
+ return this->FindPackage(args);
}
+
return true;
}
@@ -532,6 +544,14 @@ void cmake::ReadListFile(const std::vector<std::string>& args,
}
}
+
+bool cmake::FindPackage(const std::vector<std::string>& args)
+{
+ // create empty function for now, will be filled later
+ return true;
+}
+
+
// Parse the args
void cmake::SetArgs(const std::vector<std::string>& args,
bool directoriesSetBefore)
@@ -604,6 +624,11 @@ void cmake::SetArgs(const std::vector<std::string>& args,
// skip for now
i++;
}
+ else if(arg.find("--find-package",0) == 0)
+ {
+ // skip for now
+ i++;
+ }
else if(arg.find("-Wno-dev",0) == 0)
{
// skip for now