diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-11-20 09:58:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-08 00:07:27 (GMT) |
commit | 435c912848b08333e03c74439f725c9b96890d80 (patch) | |
tree | ef1aaad7af3149558792db8209feef24e31f509a /Source/cmExportFileGenerator.cxx | |
parent | fe732264e9abb6249d1d112b24ce36b226590105 (diff) | |
download | CMake-435c912848b08333e03c74439f725c9b96890d80.zip CMake-435c912848b08333e03c74439f725c9b96890d80.tar.gz CMake-435c912848b08333e03c74439f725c9b96890d80.tar.bz2 |
export: Add support for INTERFACE_LIBRARY targets
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 ef336ea..8c841cb 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; } @@ -887,6 +890,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; } |