2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2003-01-21 00:59:02 +03:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2003-01-21 00:59:02 +03:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2003-01-21 00:59:02 +03:00
|
|
|
#ifndef cmExportLibraryDependenciesCommand_h
|
|
|
|
#define cmExportLibraryDependenciesCommand_h
|
|
|
|
|
|
|
|
#include "cmCommand.h"
|
|
|
|
|
|
|
|
/** \class cmExportLibraryDependenciesCommand
|
|
|
|
* \brief Add a test to the lists of tests to run.
|
|
|
|
*
|
2006-05-10 23:08:38 +04:00
|
|
|
* cmExportLibraryDependenciesCommand adds a test to the list of tests to run
|
|
|
|
*
|
2003-01-21 00:59:02 +03:00
|
|
|
*/
|
|
|
|
class cmExportLibraryDependenciesCommand : public cmCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* This is a virtual constructor for the command.
|
|
|
|
*/
|
|
|
|
virtual cmCommand* Clone()
|
|
|
|
{
|
|
|
|
return new cmExportLibraryDependenciesCommand;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This is called when the command is first encountered in
|
|
|
|
* the CMakeLists.txt file.
|
|
|
|
*/
|
2008-01-23 18:28:26 +03:00
|
|
|
virtual bool InitialPass(std::vector<std::string> const& args,
|
|
|
|
cmExecutionStatus &status);
|
2003-01-21 00:59:02 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This is called at the end after all the information
|
|
|
|
* specified by the command is accumulated.
|
|
|
|
*/
|
|
|
|
virtual void FinalPass();
|
2009-07-24 21:31:34 +04:00
|
|
|
virtual bool HasFinalPass() const { return true; }
|
2003-01-21 00:59:02 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The name of the command as specified in CMakeList.txt.
|
|
|
|
*/
|
2012-02-25 10:49:24 +04:00
|
|
|
virtual const char* GetName() const { return "export_library_dependencies";}
|
2003-01-21 00:59:02 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Succinct documentation.
|
|
|
|
*/
|
2012-02-25 10:49:24 +04:00
|
|
|
virtual const char* GetTerseDocumentation() const
|
2003-01-21 00:59:02 +03:00
|
|
|
{
|
2008-02-20 21:36:38 +03:00
|
|
|
return "Deprecated. Use INSTALL(EXPORT) or EXPORT command.";
|
2003-01-21 00:59:02 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* More documentation.
|
|
|
|
*/
|
2012-02-25 10:49:24 +04:00
|
|
|
virtual const char* GetFullDocumentation() const
|
2003-01-21 00:59:02 +03:00
|
|
|
{
|
|
|
|
return
|
2008-02-20 21:36:38 +03:00
|
|
|
"This command generates an old-style library dependencies file. "
|
|
|
|
"Projects requiring CMake 2.6 or later should not use the command. "
|
|
|
|
"Use instead the install(EXPORT) command to help export targets "
|
|
|
|
"from an installation tree and the export() command to export targets "
|
|
|
|
"from a build tree.\n"
|
|
|
|
"The old-style library dependencies file does not take into account "
|
|
|
|
"per-configuration names of libraries or the LINK_INTERFACE_LIBRARIES "
|
|
|
|
"target property.\n"
|
2007-12-21 01:49:38 +03:00
|
|
|
" export_library_dependencies(<file> [APPEND])\n"
|
|
|
|
"Create a file named <file> that can be included into a CMake listfile "
|
|
|
|
"with the INCLUDE command. The file will contain a number of SET "
|
|
|
|
"commands that will set all the variables needed for library dependency "
|
2003-01-21 00:59:02 +03:00
|
|
|
"information. This should be the last command in the top level "
|
2003-02-15 02:47:16 +03:00
|
|
|
"CMakeLists.txt file of the project. If the APPEND option is "
|
|
|
|
"specified, the SET commands will be appended to the given file "
|
|
|
|
"instead of replacing it.";
|
2003-01-21 00:59:02 +03:00
|
|
|
}
|
2008-02-20 21:36:38 +03:00
|
|
|
|
|
|
|
/** This command is kept for compatibility with older CMake versions. */
|
2012-02-25 10:49:24 +04:00
|
|
|
virtual bool IsDiscouraged() const
|
2008-02-20 21:36:38 +03:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2003-01-21 00:59:02 +03:00
|
|
|
|
|
|
|
cmTypeMacro(cmExportLibraryDependenciesCommand, cmCommand);
|
|
|
|
|
|
|
|
private:
|
2007-06-15 18:10:24 +04:00
|
|
|
std::string Filename;
|
|
|
|
bool Append;
|
|
|
|
void ConstFinalPass() const;
|
2003-01-21 00:59:02 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|