1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
15 #include "cmFindCommon.h"
18 * \brief Base class for most FIND_XXX commands.
20 * cmFindBase is a parent class for cmFindProgramCommand, cmFindPathCommand,
21 * and cmFindLibraryCommand, cmFindFileCommand
23 class cmFindBase : public cmFindCommon
28 * This is called when the command is first encountered in
29 * the CMakeLists.txt file.
31 virtual bool ParseArguments(std::vector<std::string> const& args);
32 cmTypeMacro(cmFindBase, cmFindCommon);
34 virtual const char* GetFullDocumentation() const;
37 virtual void GenerateDocumentation();
38 void PrintFindStuff();
40 void AddPathSuffixes();
42 // see if the VariableName is already set in the cache,
43 // also copy the documentation from the cache to VariableDocumentation
44 // if it has documentation in the cache
45 bool CheckForVariableInCache();
47 cmStdString GenericDocumentation;
48 // use by command during find
49 cmStdString VariableDocumentation;
50 cmStdString VariableName;
51 std::vector<std::string> Names;
53 // CMAKE_*_PATH CMAKE_SYSTEM_*_PATH FRAMEWORK|LIBRARY|INCLUDE|PROGRAM
54 cmStdString EnvironmentPath; // LIB,INCLUDE
57 bool AlreadyInCacheWithoutMetaInfo;
59 // Add pieces of the search.
60 void AddCMakeEnvironmentPath();
61 void AddCMakeVariablePath();
62 void AddSystemEnvironmentPath();
63 void AddCMakeSystemVariablePath();
64 void AddUserHintsPath();
65 void AddUserGuessPath();
68 void AddCMakePrefixPath(const char* variable);
69 void AddEnvPrefixPath(const char* variable);
70 void AddPrefixPaths(std::vector<std::string> const& in_paths,