diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-11-20 11:44:04 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-11-25 15:17:50 (GMT) |
commit | 0bfcb450e6cab8d9c2c079e10bf0acea62ffadbe (patch) | |
tree | eb8e1b76aae32f91fc6f5f47e81bd709b87215ed /Source/cmExportFileGenerator.cxx | |
parent | 9f095b74162b972d07c695ad23964056f310ade2 (diff) | |
download | CMake-0bfcb450e6cab8d9c2c079e10bf0acea62ffadbe.zip CMake-0bfcb450e6cab8d9c2c079e10bf0acea62ffadbe.tar.gz CMake-0bfcb450e6cab8d9c2c079e10bf0acea62ffadbe.tar.bz2 |
INTERFACE_LIBRARY: Avoid codepaths which set unneeded properties.
As an INTERFACE_LIBRARY has no direct link dependencies, we can
short-circuit in cmGeneratorExpressionEvaluator and
in cmGlobalGenerator::CheckLocalGenerators.
As they do not generate any output directly, any generate- or install-
related code acn also be short-circuited. Many of the local generators
already do this.
Because only INTERFACE related properties make sense on INTERFACE_LIBRARY
targets, avoid setting other properties, for example via defaults.
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 2ce4458..dc62284 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -388,14 +388,11 @@ void getCompatibleInterfaceProperties(cmTarget *target, if (!info) { - 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()); - } + 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; } @@ -447,15 +444,18 @@ void cmExportFileGenerator::PopulateCompatibleInterfaceProperties( getPropertyContents(target, "COMPATIBLE_INTERFACE_NUMBER_MAX", ifaceProperties); - getCompatibleInterfaceProperties(target, ifaceProperties, 0); + if (target->GetType() != cmTarget::INTERFACE_LIBRARY) + { + getCompatibleInterfaceProperties(target, ifaceProperties, 0); - std::vector<std::string> configNames; - target->GetMakefile()->GetConfigurations(configNames); + std::vector<std::string> configNames; + target->GetMakefile()->GetConfigurations(configNames); - for (std::vector<std::string>::const_iterator ci = configNames.begin(); - ci != configNames.end(); ++ci) - { - getCompatibleInterfaceProperties(target, ifaceProperties, ci->c_str()); + for (std::vector<std::string>::const_iterator ci = configNames.begin(); + ci != configNames.end(); ++ci) + { + getCompatibleInterfaceProperties(target, ifaceProperties, ci->c_str()); + } } for (std::set<std::string>::const_iterator it = ifaceProperties.begin(); |