summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-03-16 14:15:42 (GMT)
committerBrad King <brad.king@kitware.com>2012-03-19 15:53:41 (GMT)
commiteb24c99c4d8e2b56d8ab86ffa051558b7e14460b (patch)
tree139211014521e5d3e7a2837470fb88ea165254f8 /Source
parent63d1be8b0007feafa69b16fb9c8682c992017c9a (diff)
parentcd146c650e092dcbf91adf60ef697608c2ac7fa2 (diff)
downloadCMake-eb24c99c4d8e2b56d8ab86ffa051558b7e14460b.zip
CMake-eb24c99c4d8e2b56d8ab86ffa051558b7e14460b.tar.gz
CMake-eb24c99c4d8e2b56d8ab86ffa051558b7e14460b.tar.bz2
Merge branch 'object-library' into xcode-object-library
Diffstat (limited to 'Source')
-rw-r--r--Source/cmAddLibraryCommand.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmAddLibraryCommand.h b/Source/cmAddLibraryCommand.h
index 9ca9cbe..b1ae202 100644
--- a/Source/cmAddLibraryCommand.h
+++ b/Source/cmAddLibraryCommand.h
@@ -112,6 +112,26 @@ public:
"(and its per-configuration version IMPORTED_LOCATION_<CONFIG>) "
"which specifies the location of the main library file on disk. "
"See documentation of the IMPORTED_* properties for more information."
+ "\n"
+ "The signature\n"
+ " add_library(<name> OBJECT <src>...)\n"
+ "creates a special \"object library\" target. "
+ "An object library compiles source files but does not archive or link "
+ "their object files into a library. "
+ "Instead other targets created by add_library or add_executable may "
+ "reference the objects using an expression of the form "
+ "$<TARGET_OBJECTS:objlib> as a source, where \"objlib\" is the "
+ "object library name. "
+ "For example:\n"
+ " add_library(... $<TARGET_OBJECTS:objlib> ...)\n"
+ " add_executable(... $<TARGET_OBJECTS:objlib> ...)\n"
+ "will include objlib's object files in a library and an executable "
+ "along with those compiled from their own sources. "
+ "Object libraries may contain only sources (and headers) that compile "
+ "to object files. "
+ "They may contain custom commands generating such sources, but not "
+ "PRE_BUILD, PRE_LINK, or POST_BUILD commands. "
+ "Object libraries cannot be imported, exported, installed, or linked."
;
}