summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-12-04 15:23:24 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-12-04 15:23:24 (GMT)
commite4665171f45f6f06bb75f677a29d65015a4f5d0d (patch)
treea714de8eda1fff4f9eecd862879595eccf028c94 /Source
parent09f797c19ccf8fb5e4241008e9845ba9ab7200bf (diff)
parentbd360ee329e74487dba526d7847794bc66b55494 (diff)
downloadCMake-e4665171f45f6f06bb75f677a29d65015a4f5d0d.zip
CMake-e4665171f45f6f06bb75f677a29d65015a4f5d0d.tar.gz
CMake-e4665171f45f6f06bb75f677a29d65015a4f5d0d.tar.bz2
Merge topic 'fix-add_library-check-for-shared'
bd360ee3 add_library: Fix target type check for non-shared-lib platforms
Diffstat (limited to 'Source')
-rw-r--r--Source/cmAddLibraryCommand.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index cdc9f2a..bba4d41 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -328,9 +328,8 @@ bool cmAddLibraryCommand
CMAKE_${LANG}_CREATE_SHARED_LIBRARY is defined and if not default to
STATIC. But at this point we know only the name of the target, but not
yet its linker language. */
- if ((type != cmTarget::STATIC_LIBRARY) &&
- (type != cmTarget::OBJECT_LIBRARY) &&
- (type != cmTarget::INTERFACE_LIBRARY) &&
+ if ((type == cmTarget::SHARED_LIBRARY ||
+ type == cmTarget::MODULE_LIBRARY) &&
(this->Makefile->GetCMakeInstance()->GetPropertyAsBool(
"TARGET_SUPPORTS_SHARED_LIBS") == false))
{