summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-03-12 14:47:40 (GMT)
committerBrad King <brad.king@kitware.com>2012-03-13 18:37:32 (GMT)
commitb87d7a60a0ed146b79c49baedb666db228d5a70f (patch)
tree4ff0a6246e4c7b78edc7c77e481fa8c0aaec9844 /Source/cmTarget.h
parentd5aedf15a4a6d7023a7ba73dcf92b24607af4606 (diff)
downloadCMake-b87d7a60a0ed146b79c49baedb666db228d5a70f.zip
CMake-b87d7a60a0ed146b79c49baedb666db228d5a70f.tar.gz
CMake-b87d7a60a0ed146b79c49baedb666db228d5a70f.tar.bz2
Add OBJECT_LIBRARY target type
This library type can compile sources to object files but does not link or archive them. It will be useful to reference from executable and normal library targets for direct inclusion of object files in them. Diagnose and reject the following as errors: * An OBJECT library may not be referenced in target_link_libraries. * An OBJECT library may contain only compiling sources and supporting headers and custom commands. Other source types that are not normally ignored are not allowed. * An OBJECT library may not have PRE_BUILD, PRE_LINK, or POST_BUILD commands. * An OBJECT library may not be installed, exported, or imported. Some of these cases may be supported in the future but are not for now. Teach the VS generator that OBJECT_LIBRARY targets are "linkable" just like STATIC_LIBRARY targets for the LinkLibraryDependencies behavior.
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r--Source/cmTarget.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index ff05cd3..e2502f0 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -59,7 +59,8 @@ class cmTarget
public:
cmTarget();
enum TargetType { EXECUTABLE, STATIC_LIBRARY,
- SHARED_LIBRARY, MODULE_LIBRARY, UTILITY, GLOBAL_TARGET,
+ SHARED_LIBRARY, MODULE_LIBRARY,
+ OBJECT_LIBRARY, UTILITY, GLOBAL_TARGET,
UNKNOWN_LIBRARY};
static const char* GetTargetTypeName(TargetType targetType);
enum CustomCommandType { PRE_BUILD, PRE_LINK, POST_BUILD };