1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmExportLibraryDependencies.h,v $
6 Date: $Date: 2009-07-24 17:31:34 $
7 Version: $Revision: 1.11 $
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 cmExportLibraryDependenciesCommand_h
18 #define cmExportLibraryDependenciesCommand_h
20 #include "cmCommand.h"
22 /** \class cmExportLibraryDependenciesCommand
23 * \brief Add a test to the lists of tests to run.
25 * cmExportLibraryDependenciesCommand adds a test to the list of tests to run
28 class cmExportLibraryDependenciesCommand
: public cmCommand
32 * This is a virtual constructor for the command.
34 virtual cmCommand
* Clone()
36 return new cmExportLibraryDependenciesCommand
;
40 * This is called when the command is first encountered in
41 * the CMakeLists.txt file.
43 virtual bool InitialPass(std::vector
<std::string
> const& args
,
44 cmExecutionStatus
&status
);
47 * This is called at the end after all the information
48 * specified by the command is accumulated.
50 virtual void FinalPass();
51 virtual bool HasFinalPass() const { return true; }
54 * The name of the command as specified in CMakeList.txt.
56 virtual const char* GetName() { return "export_library_dependencies";}
59 * Succinct documentation.
61 virtual const char* GetTerseDocumentation()
63 return "Deprecated. Use INSTALL(EXPORT) or EXPORT command.";
69 virtual const char* GetFullDocumentation()
72 "This command generates an old-style library dependencies file. "
73 "Projects requiring CMake 2.6 or later should not use the command. "
74 "Use instead the install(EXPORT) command to help export targets "
75 "from an installation tree and the export() command to export targets "
76 "from a build tree.\n"
77 "The old-style library dependencies file does not take into account "
78 "per-configuration names of libraries or the LINK_INTERFACE_LIBRARIES "
80 " export_library_dependencies(<file> [APPEND])\n"
81 "Create a file named <file> that can be included into a CMake listfile "
82 "with the INCLUDE command. The file will contain a number of SET "
83 "commands that will set all the variables needed for library dependency "
84 "information. This should be the last command in the top level "
85 "CMakeLists.txt file of the project. If the APPEND option is "
86 "specified, the SET commands will be appended to the given file "
87 "instead of replacing it.";
90 /** This command is kept for compatibility with older CMake versions. */
91 virtual bool IsDiscouraged()
96 cmTypeMacro(cmExportLibraryDependenciesCommand
, cmCommand
);
101 void ConstFinalPass() const;