cmInstallProgramsCommand.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2001 Insight Consortium
  8. All rights reserved.
  9. Redistribution and use in source and binary forms, with or without
  10. modification, are permitted provided that the following conditions are met:
  11. * Redistributions of source code must retain the above copyright notice,
  12. this list of conditions and the following disclaimer.
  13. * Redistributions in binary form must reproduce the above copyright notice,
  14. this list of conditions and the following disclaimer in the documentation
  15. and/or other materials provided with the distribution.
  16. * The name of the Insight Consortium, nor the names of any consortium members,
  17. nor of any contributors, may be used to endorse or promote products derived
  18. from this software without specific prior written permission.
  19. * Modified source versions must be plainly marked as such, and must not be
  20. misrepresented as being the original software.
  21. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
  22. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24. ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
  25. ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  26. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  27. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  28. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  29. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  30. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. =========================================================================*/
  32. #ifndef cmInstallProgramsCommand_h
  33. #define cmInstallProgramsCommand_h
  34. #include "cmStandardIncludes.h"
  35. #include "cmCommand.h"
  36. /** \class cmInstallProgramsCommand
  37. * \brief Specifies where to install some programs
  38. *
  39. * cmInstallProgramsCommand specifies the relative path where a list of
  40. * programs should be installed.
  41. */
  42. class cmInstallProgramsCommand : public cmCommand
  43. {
  44. public:
  45. /**
  46. * This is a virtual constructor for the command.
  47. */
  48. virtual cmCommand* Clone()
  49. {
  50. return new cmInstallProgramsCommand;
  51. }
  52. /**
  53. * This is called when the command is first encountered in
  54. * the CMakeLists.txt file.
  55. */
  56. virtual bool InitialPass(std::vector<std::string>& args);
  57. /**
  58. * The name of the command as specified in CMakeList.txt.
  59. */
  60. virtual const char* GetName() { return "INSTALL_PROGRAMS";}
  61. /**
  62. * Succinct documentation.
  63. */
  64. virtual const char* GetTerseDocumentation()
  65. {
  66. return "Create install rules for programs";
  67. }
  68. /**
  69. * This is called at the end after all the information
  70. * specified by the command is accumulated. Most commands do
  71. * not implement this method. At this point, reading and
  72. * writing to the cache can be done.
  73. */
  74. virtual void FinalPass();
  75. /**
  76. * More documentation.
  77. */
  78. virtual const char* GetFullDocumentation()
  79. {
  80. return
  81. "INSTALL_PROGRAMS(path file file ...)\n"
  82. "INSTALL_PROGRAMS(path regexp)\n"
  83. "Create rules to install the listed programs into the path. Path is relative to the variable CMAKE_INSTALL_PREFIX. There are two forms for this command. In the first the programs can be specified explicitly. In the second form any program in the current directory that match the regular expression will be installed.";
  84. }
  85. cmTypeMacro(cmInstallProgramsCommand, cmCommand);
  86. private:
  87. std::vector<std::string> m_FinalArgs;
  88. };
  89. #endif