diff options
author | Brad King <brad.king@kitware.com> | 2013-07-25 12:47:49 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-07-25 12:47:49 (GMT) |
commit | 10e54cd6c9437c27b3a758f8de1455086c53fae5 (patch) | |
tree | 6b5bf96206ddfbbd13301049eb40bc13dce2f432 /Source | |
parent | 17fb435b213c660bd320cc85752444f5e13ce90a (diff) | |
parent | 5837f19690c7ef490e70baedce0a8b89594da3af (diff) | |
download | CMake-10e54cd6c9437c27b3a758f8de1455086c53fae5.zip CMake-10e54cd6c9437c27b3a758f8de1455086c53fae5.tar.gz CMake-10e54cd6c9437c27b3a758f8de1455086c53fae5.tar.bz2 |
Merge topic 'dev/export-target-without-language'
5837f19 export: Error when exporting a target without a language
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 90e6d51..4de1aae 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -349,6 +349,16 @@ void getCompatibleInterfaceProperties(cmTarget *target, { cmComputeLinkInformation *info = target->GetLinkInformation(config); + 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()); + return; + } + const cmComputeLinkInformation::ItemVector &deps = info->GetItems(); for(cmComputeLinkInformation::ItemVector::const_iterator li = |