CVS resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / cmExportCommand.h
blob5ad501999b0787118b7950bb8eaf277aad732ec7
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmExportCommand.h,v $
5 Language: C++
6 Date: $Date: 2008/01/30 22:25:52 $
7 Version: $Revision: 1.9 $
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 cmExportCommand_h
18 #define cmExportCommand_h
20 #include "cmCommand.h"
22 class cmExportBuildFileGenerator;
24 /** \class cmExportLibraryDependenciesCommand
25 * \brief Add a test to the lists of tests to run.
27 * cmExportLibraryDependenciesCommand adds a test to the list of tests to run
30 class cmExportCommand : public cmCommand
32 public:
33 cmExportCommand();
34 /**
35 * This is a virtual constructor for the command.
37 virtual cmCommand* Clone()
39 return new cmExportCommand;
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 * The name of the command as specified in CMakeList.txt.
52 virtual const char* GetName() { return "export";}
54 /**
55 * Succinct documentation.
57 virtual const char* GetTerseDocumentation()
59 return
60 "Export targets from the build tree for use by outside projects.";
63 /**
64 * More documentation.
66 virtual const char* GetFullDocumentation()
68 return
69 " export(TARGETS [target1 [target2 [...]]] [NAMESPACE <namespace>]\n"
70 " [APPEND] FILE <filename>)\n"
71 "Create a file <filename> that may be included by outside projects to "
72 "import targets from the current project's build tree. "
73 "This is useful during cross-compiling to build utility executables "
74 "that can run on the host platform in one project and then import "
75 "them into another project being compiled for the target platform. "
76 "If the NAMESPACE option is given the <namespace> string will be "
77 "prepended to all target names written to the file. "
78 "If the APPEND option is given the generated code will be appended "
79 "to the file instead of overwriting it. "
80 "If a library target is included in the export but "
81 "a target to which it links is not included the behavior is "
82 "unspecified."
83 "\n"
84 "The file created by this command is specific to the build tree and "
85 "should never be installed. "
86 "See the install(EXPORT) command to export targets from an "
87 "installation tree.";
90 cmTypeMacro(cmExportCommand, cmCommand);
92 private:
93 cmCommandArgumentGroup ArgumentGroup;
94 cmCAStringVector Targets;
95 cmCAEnabler Append;
96 cmCAString Namespace;
97 cmCAString Filename;
99 friend class cmExportBuildFileGenerator;
100 std::string ErrorMessage;
104 #endif