summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-07-20 15:30:38 (GMT)
committerBrad King <brad.king@kitware.com>2020-07-23 17:31:44 (GMT)
commit422d9a0ab21ff430e5fd012cf965dd92068d185f (patch)
tree9aeabc71a17acf32289eb19890d7d58b8aa58c21 /Source/cmGlobalXCodeGenerator.cxx
parentbce82df0aaa4046b31fcf0608f0ce1249bdfc9bd (diff)
downloadCMake-422d9a0ab21ff430e5fd012cf965dd92068d185f.zip
CMake-422d9a0ab21ff430e5fd012cf965dd92068d185f.tar.gz
CMake-422d9a0ab21ff430e5fd012cf965dd92068d185f.tar.bz2
Factor out generator checks for filtering out interface libraries
Add a `cmGeneratorTarget::IsInBuildSystem` helper method to tell generators whether a target should participate in the generated build system.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx18
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index e54de5d..26760ea 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1199,7 +1199,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTarget(
return true;
}
- if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!gtgt->IsInBuildSystem()) {
return true;
}
@@ -1845,7 +1845,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
cmXCodeObject* buildSettings,
const std::string& configName)
{
- if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!gtgt->IsInBuildSystem()) {
return;
}
@@ -2678,7 +2678,7 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType(
cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget(
cmGeneratorTarget* gtgt, cmXCodeObject* buildPhases)
{
- if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!gtgt->IsInBuildSystem()) {
return nullptr;
}
cmXCodeObject* target = this->CreateObject(cmXCodeObject::PBXNativeTarget);
@@ -2821,7 +2821,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
cmSystemTools::Error("Error no target on xobject\n");
return;
}
- if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!gt->IsInBuildSystem()) {
return;
}
@@ -3113,13 +3113,9 @@ bool cmGlobalXCodeGenerator::CreateGroups(
// end up with (empty anyhow) ZERO_CHECK, install, or test source
// groups:
//
- if (gtgt->GetType() == cmStateEnums::GLOBAL_TARGET) {
- continue;
- }
- if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
- continue;
- }
- if (gtgt->GetName() == CMAKE_CHECK_BUILD_SYSTEM_TARGET) {
+ if (!gtgt->IsInBuildSystem() ||
+ gtgt->GetType() == cmStateEnums::GLOBAL_TARGET ||
+ gtgt->GetName() == CMAKE_CHECK_BUILD_SYSTEM_TARGET) {
continue;
}