summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmComputeTargetDepends.cxx25
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx92
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx1
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx3
-rw-r--r--Source/cmMakefileTargetGenerator.cxx1
5 files changed, 44 insertions, 78 deletions
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index cb9e37e..02fd173 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -199,6 +199,10 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
{
// Get the depender.
cmTarget* depender = this->Targets[depender_index];
+ if (depender->GetType() == cmTarget::INTERFACE_LIBRARY)
+ {
+ return;
+ }
// Loop over all targets linked directly in all configs.
// We need to make targets depend on the union of all config-specific
@@ -208,15 +212,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
std::set<cmStdString> emitted;
{
std::vector<std::string> tlibs;
- if (depender->GetType() == cmTarget::INTERFACE_LIBRARY)
- {
- // For INTERFACE_LIBRARY depend on the interface instead.
- depender->GetInterfaceLinkLibraries(0, tlibs, depender);
- }
- else
- {
- depender->GetDirectLinkLibraries(0, tlibs, depender);
- }
+ depender->GetDirectLinkLibraries(0, tlibs, depender);
// A target should not depend on itself.
emitted.insert(depender->GetName());
for(std::vector<std::string>::const_iterator lib = tlibs.begin();
@@ -237,15 +233,8 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
it != configs.end(); ++it)
{
std::vector<std::string> tlibs;
- if (depender->GetType() == cmTarget::INTERFACE_LIBRARY)
- {
- // For INTERFACE_LIBRARY depend on the interface instead.
- depender->GetInterfaceLinkLibraries(it->c_str(), tlibs, depender);
- }
- else
- {
- depender->GetDirectLinkLibraries(it->c_str(), tlibs, depender);
- }
+ depender->GetDirectLinkLibraries(it->c_str(), tlibs, depender);
+
// A target should not depend on itself.
emitted.insert(depender->GetName());
for(std::vector<std::string>::const_iterator lib = tlibs.begin();
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 6333873..52465dc 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -480,7 +480,6 @@ cmGlobalUnixMakefileGenerator3
(l->second->GetType() == cmTarget::SHARED_LIBRARY) ||
(l->second->GetType() == cmTarget::MODULE_LIBRARY) ||
(l->second->GetType() == cmTarget::OBJECT_LIBRARY) ||
- (l->second->GetType() == cmTarget::INTERFACE_LIBRARY) ||
(l->second->GetType() == cmTarget::UTILITY))
{
if(l->second->Target->IsImported())
@@ -658,7 +657,6 @@ cmGlobalUnixMakefileGenerator3
(t->second->GetType() == cmTarget::SHARED_LIBRARY) ||
(t->second->GetType() == cmTarget::MODULE_LIBRARY) ||
(t->second->GetType() == cmTarget::OBJECT_LIBRARY) ||
- (t->second->GetType() == cmTarget::INTERFACE_LIBRARY) ||
(t->second->GetType() == cmTarget::UTILITY)))
{
// Add a rule to build the target by name.
@@ -680,10 +678,6 @@ cmGlobalUnixMakefileGenerator3
t->second->GetName(), depends, commands,
true);
- if (t->second->GetType() == cmTarget::INTERFACE_LIBRARY)
- {
- continue;
- }
// Add a fast rule to build the target
std::string localName =
lg->GetRelativeTargetDirectory(*t->second->Target);
@@ -757,7 +751,6 @@ cmGlobalUnixMakefileGenerator3
|| (t->second->GetType() == cmTarget::SHARED_LIBRARY)
|| (t->second->GetType() == cmTarget::MODULE_LIBRARY)
|| (t->second->GetType() == cmTarget::OBJECT_LIBRARY)
- || (t->second->GetType() == cmTarget::INTERFACE_LIBRARY)
|| (t->second->GetType() == cmTarget::UTILITY)))
{
std::string makefileName;
@@ -774,64 +767,53 @@ cmGlobalUnixMakefileGenerator3
<< localName << "\n\n";
commands.clear();
+ makeTargetName = localName;
+ makeTargetName += "/depend";
+ commands.push_back(lg->GetRecursiveMakeCall
+ (makefileName.c_str(),makeTargetName.c_str()));
- if(t->second->GetType() != cmTarget::INTERFACE_LIBRARY)
+ // add requires if we need it for this generator
+ if (needRequiresStep)
{
makeTargetName = localName;
- makeTargetName += "/depend";
+ makeTargetName += "/requires";
commands.push_back(lg->GetRecursiveMakeCall
(makefileName.c_str(),makeTargetName.c_str()));
+ }
+ makeTargetName = localName;
+ makeTargetName += "/build";
+ commands.push_back(lg->GetRecursiveMakeCall
+ (makefileName.c_str(),makeTargetName.c_str()));
- // add requires if we need it for this generator
- if (needRequiresStep)
- {
- makeTargetName = localName;
- makeTargetName += "/requires";
- commands.push_back(lg->GetRecursiveMakeCall
- (makefileName.c_str(),makeTargetName.c_str()));
- }
- makeTargetName = localName;
- makeTargetName += "/build";
- commands.push_back(lg->GetRecursiveMakeCall
- (makefileName.c_str(),makeTargetName.c_str()));
-
- // Write the rule.
- localName += "/all";
- depends.clear();
+ // Write the rule.
+ localName += "/all";
+ depends.clear();
- std::string progressDir =
- lg->GetMakefile()->GetHomeOutputDirectory();
- progressDir += cmake::GetCMakeFilesDirectory();
+ std::string progressDir =
+ lg->GetMakefile()->GetHomeOutputDirectory();
+ progressDir += cmake::GetCMakeFilesDirectory();
+ {
+ cmOStringStream progCmd;
+ progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
+ // all target counts
+ progCmd << lg->Convert(progressDir.c_str(),
+ cmLocalGenerator::FULL,
+ cmLocalGenerator::SHELL);
+ progCmd << " ";
+ std::vector<unsigned long>& progFiles =
+ this->ProgressMap[t->second->Target].Marks;
+ for (std::vector<unsigned long>::iterator i = progFiles.begin();
+ i != progFiles.end(); ++i)
{
- cmOStringStream progCmd;
- progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
- // all target counts
- progCmd << lg->Convert(progressDir.c_str(),
- cmLocalGenerator::FULL,
- cmLocalGenerator::SHELL);
- progCmd << " ";
- std::vector<unsigned long>& progFiles =
- this->ProgressMap[t->second->Target].Marks;
- for (std::vector<unsigned long>::iterator i = progFiles.begin();
- i != progFiles.end(); ++i)
- {
- progCmd << " " << *i;
- }
- commands.push_back(progCmd.str());
+ progCmd << " " << *i;
}
- progressDir = "Built target ";
- progressDir += t->second->GetName();
- lg->AppendEcho(commands,progressDir.c_str());
- }
- else
- {
- depends.clear();
+ commands.push_back(progCmd.str());
}
+ progressDir = "Built target ";
+ progressDir += t->second->GetName();
+ lg->AppendEcho(commands,progressDir.c_str());
+
this->AppendGlobalTargetDepends(depends,*t->second->Target);
- if(depends.empty() && this->EmptyRuleHackDepends != "")
- {
- depends.push_back(this->EmptyRuleHackDepends);
- }
lg->WriteMakeRule(ruleFileStream, "All Build rule for target.",
localName.c_str(), depends, commands, true);
@@ -847,7 +829,7 @@ cmGlobalUnixMakefileGenerator3
// Write the rule.
commands.clear();
- std::string progressDir = lg->GetMakefile()->GetHomeOutputDirectory();
+ progressDir = lg->GetMakefile()->GetHomeOutputDirectory();
progressDir += cmake::GetCMakeFilesDirectory();
{
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 6ca386c..7e97f78 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -388,7 +388,6 @@ void cmLocalUnixMakefileGenerator3
(t->second->GetType() == cmTarget::SHARED_LIBRARY) ||
(t->second->GetType() == cmTarget::MODULE_LIBRARY) ||
(t->second->GetType() == cmTarget::OBJECT_LIBRARY) ||
- (t->second->GetType() == cmTarget::INTERFACE_LIBRARY) ||
(t->second->GetType() == cmTarget::UTILITY))
{
if (t->second->Target->IsImported())
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 35818ee..399b582 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -85,9 +85,6 @@ void cmMakefileLibraryTargetGenerator::WriteRuleFiles()
case cmTarget::OBJECT_LIBRARY:
this->WriteObjectLibraryRules();
break;
- case cmTarget::INTERFACE_LIBRARY:
- // Nothing to do.
- break;
default:
// If language is not known, this is an error.
cmSystemTools::Error("Unknown Library Type");
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 2063a24..6e70285 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -76,7 +76,6 @@ cmMakefileTargetGenerator::New(cmGeneratorTarget *tgt)
case cmTarget::SHARED_LIBRARY:
case cmTarget::MODULE_LIBRARY:
case cmTarget::OBJECT_LIBRARY:
- case cmTarget::INTERFACE_LIBRARY:
result = new cmMakefileLibraryTargetGenerator(tgt);
break;
case cmTarget::UTILITY: