diff options
author | Brad King <brad.king@kitware.com> | 2013-10-08 14:58:40 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-10-08 14:58:40 (GMT) |
commit | f8241136b42c7e1064ca8764c6fa5e17012127da (patch) | |
tree | fcb5064ea98b99e5c4bea0cc9b9ade5863f14b46 /Source/cmExportFileGenerator.cxx | |
parent | 5c57fdedb19897880e5c13f9a0dd35ad4087565c (diff) | |
parent | ce0c303d62941d2b10098b1ec00de3ced8556919 (diff) | |
download | CMake-f8241136b42c7e1064ca8764c6fa5e17012127da.zip CMake-f8241136b42c7e1064ca8764c6fa5e17012127da.tar.gz CMake-f8241136b42c7e1064ca8764c6fa5e17012127da.tar.bz2 |
Merge topic 'INTERFACE_LIBRARY-target-type'
ce0c303 install: Teach EXPORT option to handle INTERFACE_LIBRARY targets
435c912 export: Add support for INTERFACE_LIBRARY targets
fe73226 Add the INTERFACE_LIBRARY target type.
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 0a93533..25c5710 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -378,11 +378,14 @@ void getCompatibleInterfaceProperties(cmTarget *target, if (!info) { - cmMakefile* mf = target->GetMakefile(); - cmOStringStream e; - e << "Exporting the target \"" << target->GetName() << "\" is not " - "allowed since its linker language cannot be determined"; - mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + if (target->GetType() != cmTarget::INTERFACE_LIBRARY) + { + cmMakefile* mf = target->GetMakefile(); + cmOStringStream e; + e << "Exporting the target \"" << target->GetName() << "\" is not " + "allowed since its linker language cannot be determined"; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + } return; } @@ -888,6 +891,9 @@ cmExportFileGenerator case cmTarget::UNKNOWN_LIBRARY: os << "add_library(" << targetName << " UNKNOWN IMPORTED)\n"; break; + case cmTarget::INTERFACE_LIBRARY: + os << "add_library(" << targetName << " INTERFACE IMPORTED)\n"; + break; default: // should never happen break; } |