summaryrefslogtreecommitdiffstats
path: root/Source/cmFindBase.h
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-02-27 21:38:22 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-02-27 21:38:22 (GMT)
commit4650f78dd5191fdfe7de0fc914c2ba55697dcb14 (patch)
treef30e0e0d0f557977ab07baa50b51e4b30d7d799d /Source/cmFindBase.h
parent718de4cea50f12d948920e9ed2a623078a5d2ccd (diff)
downloadCMake-4650f78dd5191fdfe7de0fc914c2ba55697dcb14.zip
CMake-4650f78dd5191fdfe7de0fc914c2ba55697dcb14.tar.gz
CMake-4650f78dd5191fdfe7de0fc914c2ba55697dcb14.tar.bz2
ENH: add new find stuff
Diffstat (limited to 'Source/cmFindBase.h')
-rw-r--r--Source/cmFindBase.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/Source/cmFindBase.h b/Source/cmFindBase.h
new file mode 100644
index 0000000..b055b4f
--- /dev/null
+++ b/Source/cmFindBase.h
@@ -0,0 +1,75 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef cmFindBase_h
+#define cmFindBase_h
+
+#include "cmCommand.h"
+
+/** \class cmFindBase
+ * \brief Define a command to search for an executable program.
+ *
+ * cmFindBase is a parent class for cmFindProgramCommand, cmFindPathCommand,
+ * and cmFindLibraryCommand, cmFindFile
+ */
+class cmFindBase : public cmCommand
+{
+public:
+ cmFindBase();
+ /**
+ * This is called when the command is first encountered in
+ * the CMakeLists.txt file.
+ */
+ virtual bool ParseArguments(std::vector<std::string> const& args);
+ cmTypeMacro(cmFindBase, cmCommand);
+protected:
+ void PrintFindStuff();
+ void ExpandPaths(std::vector<std::string> userPaths);
+ void AddEnvironmentVairables();
+ void AddCMakeVairables();
+ void AddSystemEnvironmentVairables();
+ void AddCMakeSystemVariables();
+ void ExpandRegistryAndCleanPath();
+ // see if the VariableName is already set in the cache,
+ // also copy the documentation from the cache to VariableDocumentation
+ // if it has documentation in the cache
+ bool CheckForVariableInCache();
+
+ // use by command during find
+ cmStdString VariableDocumentation;
+ cmStdString VariableName;
+ std::vector<std::string> Names;
+ std::vector<std::string> SearchPaths;
+ std::vector<std::string> SearchPathSuffixes;
+
+ cmStdString CMakePathName; // CMAKE_*_PATH CMAKE_SYSTEM_*_PATH FRAMEWORK|LIBRARY|INCLUDE|PROGRAM
+ cmStdString EnvironmentPath; // LIB,INCLUDE
+
+ bool AlreadyInCache;
+ bool NoSystemPath;
+ bool NoCMakeEnvironmentPath;
+ bool NoCMakePath;
+ bool NoCMakeSystemPath;
+
+ bool SearchFrameworkFirst;
+ bool SearchFrameworkOnly;
+ bool SearchFrameworkLast;
+
+};
+
+
+
+#endif