CMake/Source/cmFindProgramCommand.h

97 lines
3.0 KiB
C
Raw Normal View History

2001-01-11 16:04:28 +03:00
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
2001-01-11 16:04:28 +03:00
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.
2001-01-11 16:04:28 +03:00
2002-01-21 23:30:43 +03:00
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.
2001-01-11 16:04:28 +03:00
=========================================================================*/
2001-01-18 19:20:24 +03:00
#ifndef cmFindProgramCommand_h
#define cmFindProgramCommand_h
2001-01-18 19:20:24 +03:00
#include "cmCommand.h"
2001-01-18 19:20:24 +03:00
/** \class cmFindProgramCommand
* \brief Define a command to search for an executable program.
2001-01-11 16:04:28 +03:00
*
2001-01-18 19:20:24 +03:00
* cmFindProgramCommand is used to define a CMake variable
* that specifies an executable program. The command searches
2001-01-11 22:47:38 +03:00
* in the current path (e.g., PATH environment variable) for
* an executable that matches one of the supplied names.
2001-01-11 16:04:28 +03:00
*/
2001-01-18 19:20:24 +03:00
class cmFindProgramCommand : public cmCommand
{
public:
2001-01-11 16:04:28 +03:00
/**
2001-01-18 19:20:24 +03:00
* This is a virtual constructor for the command.
2001-01-11 16:04:28 +03:00
*/
2001-01-18 19:20:24 +03:00
virtual cmCommand* Clone()
{
2001-01-18 19:20:24 +03:00
return new cmFindProgramCommand;
}
2001-01-11 16:04:28 +03:00
/**
2001-01-18 19:20:24 +03:00
* This is called when the command is first encountered in
2001-01-11 16:04:28 +03:00
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args);
2001-01-11 16:04:28 +03:00
/**
2001-01-18 19:20:24 +03:00
* This determines if the command gets propagated down
2001-01-11 16:04:28 +03:00
* to makefiles located in subdirectories.
*/
2002-04-12 01:02:10 +04:00
virtual bool IsInherited() { return false; }
2001-01-11 16:04:28 +03:00
/**
2001-01-18 19:20:24 +03:00
* The name of the command as specified in CMakeList.txt.
2001-01-11 16:04:28 +03:00
*/
2001-02-27 01:14:33 +03:00
virtual const char* GetName() { return "FIND_PROGRAM";}
2001-01-11 16:04:28 +03:00
/**
* Succinct documentation.
*/
2001-01-12 22:35:15 +03:00
virtual const char* GetTerseDocumentation()
{
2001-01-11 16:04:28 +03:00
return "Find an executable program.";
}
2001-01-11 16:04:28 +03:00
/**
* More documentation.
*/
2001-01-12 22:35:15 +03:00
virtual const char* GetFullDocumentation()
{
2001-01-11 16:04:28 +03:00
return
2003-11-13 21:51:18 +03:00
" FIND_PROGRAM(<VAR> NAMES name1 [name2 ...]\n"
" [PATHS path1 path2 ...]\n"
" [NO_SYSTEM_PATH]\n"
2003-11-13 21:51:18 +03:00
" [DOC \"docstring\"])\n"
"Find an executable named by one of the names given after the NAMES "
"argument. Paths specified after the PATHS argument are searched "
"in the order specified. If the NO_SYSTEM_PATH argument is not "
"specified, the search continues with the system search path "
"specified by the PATH environment variable. A cache entry named "
"by <VAR> is created to store the result. If the program is not "
"found, the result will be <VAR>-NOTFOUND. If DOC is specified "
"then the next argument is treated as a documentation string for "
"the cache entry <VAR>.\n"
" FIND_PROGRAM(VAR executableName [path1 path2 ...])\n"
"Find a program with the given name by searching in the specified "
"paths. This is a short-hand signature for the command that is "
"sufficient in many cases.";
}
cmTypeMacro(cmFindProgramCommand, cmCommand);
};
#endif