cmake/Source/cmFindBase.h

63 lines
1.6 KiB
C
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#ifndef cmFindBase_h
#define cmFindBase_h
2017-07-20 19:35:53 +02:00
#include "cmConfigure.h" // IWYU pragma: keep
2017-04-14 19:02:05 +02:00
#include <string>
#include <vector>
#include "cmFindCommon.h"
/** \class cmFindBase
* \brief Base class for most FIND_XXX commands.
*
* cmFindBase is a parent class for cmFindProgramCommand, cmFindPathCommand,
* and cmFindLibraryCommand, cmFindFileCommand
*/
class cmFindBase : public cmFindCommon
{
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);
2013-03-16 19:13:01 +02:00
protected:
void PrintFindStuff();
void ExpandPaths();
// 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();
2013-03-16 19:13:01 +02:00
// use by command during find
2015-04-27 22:25:09 +02:00
std::string VariableDocumentation;
std::string VariableName;
std::vector<std::string> Names;
2013-03-16 19:13:01 +02:00
bool NamesPerDir;
bool NamesPerDirAllowed;
// CMAKE_*_PATH CMAKE_SYSTEM_*_PATH FRAMEWORK|LIBRARY|INCLUDE|PROGRAM
2015-04-27 22:25:09 +02:00
std::string EnvironmentPath; // LIB,INCLUDE
bool AlreadyInCache;
bool AlreadyInCacheWithoutMetaInfo;
2016-07-09 11:21:54 +02:00
private:
// Add pieces of the search.
2017-07-20 19:35:53 +02:00
void FillPackageRootPath();
2015-04-27 22:25:09 +02:00
void FillCMakeVariablePath();
void FillCMakeEnvironmentPath();
void FillUserHintsPath();
void FillSystemEnvironmentPath();
void FillCMakeSystemVariablePath();
void FillUserGuessPath();
};
#endif