Clarify documentation for if.
[cmake.git] / Source / cmFindCommon.h
blobad779987733426182bda4ac3a7b1fffc669d0f0b
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmFindCommon.h,v $
5 Language: C++
6 Date: $Date: 2008-06-09 19:08:59 $
7 Version: $Revision: 1.4 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmFindCommon_h
18 #define cmFindCommon_h
20 #include "cmCommand.h"
22 /** \class cmFindCommon
23 * \brief Base class for FIND_XXX implementations.
25 * cmFindCommon is a parent class for cmFindBase,
26 * cmFindProgramCommand, cmFindPathCommand, cmFindLibraryCommand,
27 * cmFindFileCommand, and cmFindPackageCommand.
29 class cmFindCommon : public cmCommand
31 public:
32 cmFindCommon();
33 ~cmFindCommon();
34 cmTypeMacro(cmFindCommon, cmCommand);
36 protected:
38 enum RootPathMode { RootPathModeBoth,
39 RootPathModeOnlyRootPath,
40 RootPathModeNoRootPath };
42 enum PathType { FullPath, CMakePath, EnvPath };
44 /** Place a set of search paths under the search roots. */
45 void RerootPaths(std::vector<std::string>& paths);
47 /** Add trailing slashes to all search paths. */
48 void AddTrailingSlashes(std::vector<std::string>& paths);
50 /** Compute the current default root path mode. */
51 void SelectDefaultRootPathMode();
53 /** Compute the current default bundle/framework search policy. */
54 void SelectDefaultMacMode();
56 cmStdString CMakePathName;
57 RootPathMode FindRootPathMode;
59 bool CheckCommonArgument(std::string const& arg);
60 void AddPathSuffix(std::string const& arg);
61 void AddUserPath(std::string const& p,
62 std::vector<std::string>& paths);
63 void AddCMakePath(const char* variable);
64 void AddEnvPath(const char* variable);
65 void AddPathsInternal(std::vector<std::string> const& in_paths,
66 PathType pathType);
67 void AddPathInternal(std::string const& in_path, PathType pathType);
69 bool NoDefaultPath;
70 bool NoCMakePath;
71 bool NoCMakeEnvironmentPath;
72 bool NoSystemEnvironmentPath;
73 bool NoCMakeSystemPath;
75 std::vector<std::string> SearchPathSuffixes;
76 std::vector<std::string> UserPaths;
77 std::vector<std::string> UserHints;
78 std::vector<std::string> SearchPaths;
79 std::set<cmStdString> SearchPathsEmitted;
81 std::string GenericDocumentationMacPolicy;
82 std::string GenericDocumentationRootPath;
83 std::string GenericDocumentationPathsOrder;
85 bool SearchFrameworkFirst;
86 bool SearchFrameworkOnly;
87 bool SearchFrameworkLast;
89 bool SearchAppBundleFirst;
90 bool SearchAppBundleOnly;
91 bool SearchAppBundleLast;
94 #endif