diff options
author | Brad King <brad.king@kitware.com> | 2008-02-11 18:35:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-02-11 18:35:39 (GMT) |
commit | ac0e58dcfbf17dec84b7bd848f6df0175f7d516b (patch) | |
tree | fd1cbb7b8fb4d6cec4fa467ea1e174b2b8535146 /Source/cmAddLibraryCommand.h | |
parent | 739a463539946323b09e4c22f5fdd38395add1e1 (diff) | |
download | CMake-ac0e58dcfbf17dec84b7bd848f6df0175f7d516b.zip CMake-ac0e58dcfbf17dec84b7bd848f6df0175f7d516b.tar.gz CMake-ac0e58dcfbf17dec84b7bd848f6df0175f7d516b.tar.bz2 |
ENH: Enforce global target name uniqueness.
- Error if imported target is involved in conflict
- Error for non-imported target conflict unless
CMAKE_BACKWARDS_COMPATIBILITY <= 2.4
- Include OUTPUT_NAME property in error message
- Update add_executable and add_library command documentation
Diffstat (limited to 'Source/cmAddLibraryCommand.h')
-rw-r--r-- | Source/cmAddLibraryCommand.h | 45 |
1 files changed, 34 insertions, 11 deletions
diff --git a/Source/cmAddLibraryCommand.h b/Source/cmAddLibraryCommand.h index 9b95b86..ad23ffc 100644 --- a/Source/cmAddLibraryCommand.h +++ b/Source/cmAddLibraryCommand.h @@ -62,18 +62,41 @@ public: virtual const char* GetFullDocumentation() { return - " add_library(libname [SHARED | STATIC | MODULE] [EXCLUDE_FROM_ALL]\n" + " add_library(<name> [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL]\n" " source1 source2 ... sourceN)\n" - "Adds a library target. SHARED, STATIC or MODULE keywords are used " - "to set the library type. If the keyword MODULE appears, the library " - "type is set to MH_BUNDLE on systems which use dyld. On systems " - "without dyld, MODULE is treated like SHARED. If no keywords appear " - " as the second argument, the type defaults to the current value of " - "BUILD_SHARED_LIBS. If this variable is not set, the type defaults " - "to STATIC.\n" - "If EXCLUDE_FROM_ALL is given the target will not be built by default. " - "It will be built only if the user explicitly builds the target or " - "another target that requires the target depends on it." + "Adds a library target called <name> to be built from the " + "source files listed in the command invocation. " + "The <name> corresponds to the logical target name and must be " + "globally unique within a project. " + "The actual file name of the library built is constructed based on " + "conventions of the native platform " + "(such as lib<name>.a or <name>.lib)." + "\n" + "STATIC, SHARED, or MODULE may be given to specify the type of library " + "to be created. " + "STATIC libraries are archives of object files for use when linking " + "other targets. " + "SHARED libraries are linked dynamically and loaded at runtime. " + "MODULE libraries are plugins that are not linked into other targets " + "but may be loaded dynamically at runtime using dlopen-like " + "functionality. " + "If no type is given explicitly the type is STATIC or SHARED based " + "on whether the current value of the variable BUILD_SHARED_LIBS is " + "true." + "\n" + "By default the library file will be created in the build tree " + "directory corresponding to the source tree directory in which " + "the command was invoked. " + "See documentation of the ARCHIVE_OUTPUT_DIRECTORY, " + "LIBRARY_OUTPUT_DIRECTORY, and RUNTIME_OUTPUT_DIRECTORY " + "target properties to change this location. " + "See documentation of the OUTPUT_NAME target property to change " + "the <name> part of the final file name. " + "\n" + "If EXCLUDE_FROM_ALL is given the corresponding property will be " + "set on the created target. " + "See documentation of the EXCLUDE_FROM_ALL target property for " + "details." "\n" "The add_library command can also create IMPORTED library " "targets using this signature:\n" |