1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmFindFileCommand.h,v $
6 Date: $Date: 2002-04-11 21:02:10 $
7 Version: $Revision: 1.7 $
9 Copyright (c) 2002 Insight Consortium. All rights reserved.
10 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm 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 cmFindFileCommand_h
18 #define cmFindFileCommand_h
20 #include "cmStandardIncludes.h"
21 #include "cmCommand.h"
23 /** \class cmFindFileCommand
24 * \brief Define a command to search for an executable program.
26 * cmFindFileCommand is used to define a CMake variable
27 * that specifies an executable program. The command searches
28 * in the current path (e.g., PATH environment variable) for
29 * an executable that matches one of the supplied names.
31 class cmFindFileCommand
: public cmCommand
35 * This is a virtual constructor for the command.
37 virtual cmCommand
* Clone()
39 return new cmFindFileCommand
;
43 * This is called when the command is first encountered in
44 * the CMakeLists.txt file.
46 virtual bool InitialPass(std::vector
<std::string
> const& args
);
49 * This determines if the command gets propagated down
50 * to makefiles located in subdirectories.
52 virtual bool IsInherited() { return false; }
55 * The name of the command as specified in CMakeList.txt.
57 virtual const char* GetName() { return "FIND_FILE";}
60 * Succinct documentation.
62 virtual const char* GetTerseDocumentation()
64 return "Find a file.";
70 virtual const char* GetFullDocumentation()
73 "FIND_FILE(NAME file extrapath extrapath ... [DOC docstring])"
74 "Find a file in the system PATH or in any extra paths specified in the command."
75 "A cache entry called NAME is created to store the result. NOTFOUND is the value"
76 " used if the file was not found. If DOC is specified the next argument is the "
77 "documentation string for the cache entry NAME.";
80 cmTypeMacro(cmFindFileCommand
, cmCommand
);