ENH: make sure CTEST_CURL_OPTIONS work from script mode
[cmake.git] / Source / cmFindPathCommand.h
bloba080977adeb646a147cc3aa4f80095f5f4f5220d
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmFindPathCommand.h,v $
5 Language: C++
6 Date: $Date: 2008-06-09 15:58:29 $
7 Version: $Revision: 1.19 $
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 cmFindPathCommand_h
18 #define cmFindPathCommand_h
20 #include "cmFindBase.h"
23 /** \class cmFindPathCommand
24 * \brief Define a command to search for a library.
26 * cmFindPathCommand is used to define a CMake variable
27 * that specifies a library. The command searches for a given
28 * file in a list of directories.
30 class cmFindPathCommand : public cmFindBase
32 public:
33 cmFindPathCommand();
34 /**
35 * This is a virtual constructor for the command.
37 virtual cmCommand* Clone()
39 return new cmFindPathCommand;
42 /**
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,
47 cmExecutionStatus &status);
49 /**
50 * This determines if the command is invoked when in script mode.
52 virtual bool IsScriptable() { return true; }
54 /**
55 * The name of the command as specified in CMakeList.txt.
57 virtual const char* GetName() {return "find_path";}
59 /**
60 * Succinct documentation.
62 virtual const char* GetTerseDocumentation()
64 return "Find the directory containing a file.";
67 virtual const char* GetFullDocumentation();
68 cmTypeMacro(cmFindPathCommand, cmFindBase);
69 bool IncludeFileInPath;
70 bool ExtraDocAdded;
71 private:
72 std::string FindHeaderInFramework(std::string const& file,
73 std::string const& dir);
74 std::string FindHeader();
75 std::string FindNormalHeader();
76 std::string FindFrameworkHeader();
81 #endif