CMake/Source/cmFindProgramCommand.h

81 lines
1.9 KiB
C
Raw Normal View History

2001-01-11 16:04:28 +03:00
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2000 National Library of Medicine
All rights reserved.
See COPYRIGHT.txt for copyright details.
=========================================================================*/
2001-01-18 19:20:24 +03:00
#ifndef cmFindProgramCommand_h
#define cmFindProgramCommand_h
#include "cmStandardIncludes.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 Invoke(std::vector<std::string>& 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.
*/
virtual bool IsInherited() { return true; }
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
2001-02-27 01:14:33 +03:00
"FIND_PROGRAM(NAME executable1 extrapath extrapath ...)";
}
cmTypeMacro(cmFindProgramCommand, cmCommand);
};
#endif