1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef cmDependenciessCommand_h
13 #define cmDependenciessCommand_h
15 #include "cmCommand.h"
17 /** \class cmAddDependenciesCommand
18 * \brief Add a dependency to a target
20 * cmAddDependenciesCommand adds a dependency to a target
22 class cmAddDependenciesCommand : public cmCommand
26 * This is a virtual constructor for the command.
28 virtual cmCommand* Clone()
30 return new cmAddDependenciesCommand;
34 * This is called when the command is first encountered in
35 * the CMakeLists.txt file.
37 virtual bool InitialPass(std::vector<std::string> const& args,
38 cmExecutionStatus &status);
41 * The name of the command as specified in CMakeList.txt.
43 virtual const char* GetName() const { return "add_dependencies";}
46 * Succinct documentation.
48 virtual const char* GetTerseDocumentation() const
50 return "Add a dependency between top-level targets.";
56 virtual const char* GetFullDocumentation() const
59 " add_dependencies(target-name depend-target1\n"
60 " depend-target2 ...)\n"
61 "Make a top-level target depend on other top-level targets. A "
62 "top-level target is one created by ADD_EXECUTABLE, ADD_LIBRARY, "
63 "or ADD_CUSTOM_TARGET. Adding dependencies with this command "
64 "can be used to make sure one target is built before another target. "
65 "Dependencies added to an IMPORTED target are followed transitively "
66 "in its place since the target itself does not build. "
67 "See the DEPENDS option of ADD_CUSTOM_TARGET "
68 "and ADD_CUSTOM_COMMAND for adding file-level dependencies in custom "
69 "rules. See the OBJECT_DEPENDS option in "
70 "SET_SOURCE_FILES_PROPERTIES to add file-level dependencies to object "
74 cmTypeMacro(cmAddDependenciesCommand, cmCommand);