Add label summary times to ctest default output. Also, remove parallel time output...
[cmake.git] / Source / cmAddLibraryCommand.h
blob4402d5dd9bc6af136cb85c23f430f9974701627b
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmAddLibraryCommand.h,v $
5 Language: C++
6 Date: $Date: 2009-09-03 19:29:29 $
7 Version: $Revision: 1.24 $
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 cmLibrarysCommand_h
18 #define cmLibrarysCommand_h
20 #include "cmCommand.h"
22 /** \class cmLibrarysCommand
23 * \brief Defines a list of executables to build.
25 * cmLibrarysCommand defines a list of executable (i.e., test)
26 * programs to create.
28 class cmAddLibraryCommand : public cmCommand
30 public:
31 /**
32 * This is a virtual constructor for the command.
34 virtual cmCommand* Clone()
36 return new cmAddLibraryCommand;
39 /**
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);
46 /**
47 * The name of the command as specified in CMakeList.txt.
49 virtual const char* GetName() { return "add_library";}
51 /**
52 * Succinct documentation.
54 virtual const char* GetTerseDocumentation()
56 return "Add a library to the project using the specified source files.";
59 /**
60 * More documentation.
62 virtual const char* GetFullDocumentation()
64 return
65 " add_library(<name> [STATIC | SHARED | MODULE]\n"
66 " [EXCLUDE_FROM_ALL]\n"
67 " source1 source2 ... sourceN)\n"
68 "Adds a library target called <name> to be built from the "
69 "source files listed in the command invocation. "
70 "The <name> corresponds to the logical target name and must be "
71 "globally unique within a project. "
72 "The actual file name of the library built is constructed based on "
73 "conventions of the native platform "
74 "(such as lib<name>.a or <name>.lib)."
75 "\n"
76 "STATIC, SHARED, or MODULE may be given to specify the type of library "
77 "to be created. "
78 "STATIC libraries are archives of object files for use when linking "
79 "other targets. "
80 "SHARED libraries are linked dynamically and loaded at runtime. "
81 "MODULE libraries are plugins that are not linked into other targets "
82 "but may be loaded dynamically at runtime using dlopen-like "
83 "functionality. "
84 "If no type is given explicitly the type is STATIC or SHARED based "
85 "on whether the current value of the variable BUILD_SHARED_LIBS is "
86 "true."
87 "\n"
88 "By default the library file will be created in the build tree "
89 "directory corresponding to the source tree directory in which "
90 "the command was invoked. "
91 "See documentation of the ARCHIVE_OUTPUT_DIRECTORY, "
92 "LIBRARY_OUTPUT_DIRECTORY, and RUNTIME_OUTPUT_DIRECTORY "
93 "target properties to change this location. "
94 "See documentation of the OUTPUT_NAME target property to change "
95 "the <name> part of the final file name. "
96 "\n"
97 "If EXCLUDE_FROM_ALL is given the corresponding property will be "
98 "set on the created target. "
99 "See documentation of the EXCLUDE_FROM_ALL target property for "
100 "details."
101 "\n"
102 "The add_library command can also create IMPORTED library "
103 "targets using this signature:\n"
104 " add_library(<name> <SHARED|STATIC|MODULE|UNKNOWN> IMPORTED)\n"
105 "An IMPORTED library target references a library file located "
106 "outside the project. "
107 "No rules are generated to build it. "
108 "The target name has scope in the directory in which it is created "
109 "and below. "
110 "It may be referenced like any target built within the project. "
111 "IMPORTED libraries are useful for convenient reference from "
112 "commands like target_link_libraries. "
113 "Details about the imported library are specified by setting "
114 "properties whose names begin in \"IMPORTED_\". "
115 "The most important such property is IMPORTED_LOCATION "
116 "(and its per-configuration version IMPORTED_LOCATION_<CONFIG>) "
117 "which specifies the location of the main library file on disk. "
118 "See documentation of the IMPORTED_* properties for more information."
122 cmTypeMacro(cmAddLibraryCommand, cmCommand);
126 #endif