summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-07-26 08:11:44 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-07-27 19:57:29 (GMT)
commit72f43fa13ddb544f84891f14619e622baf29ae38 (patch)
treeacec27c6002dea9e9cb6f4de446c598fdbed3506 /Source
parent58811998fb63975cc92abab23044630bc11cd26d (diff)
downloadCMake-72f43fa13ddb544f84891f14619e622baf29ae38.zip
CMake-72f43fa13ddb544f84891f14619e622baf29ae38.tar.gz
CMake-72f43fa13ddb544f84891f14619e622baf29ae38.tar.bz2
cmLocalGenerator: Remove CreateCustomTargetsAndCommands method.
It loops over cmGeneratorTargets, but at the point it is called, there are no cmGeneratorTargets. This must be dead code.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx42
-rw-r--r--Source/cmLocalGenerator.h6
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx8
-rw-r--r--Source/cmLocalVisualStudio6Generator.h1
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx9
5 files changed, 0 insertions, 66 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 7e4b470..25f33d7 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -626,48 +626,6 @@ void cmLocalGenerator::AddBuildTargetRule(const std::string& llang,
target.Target->AddSource(targetFullPath);
}
-
-void cmLocalGenerator
-::CreateCustomTargetsAndCommands(std::set<std::string> const& lang)
-{
- cmGeneratorTargetsType tgts = this->Makefile->GetGeneratorTargets();
- for(cmGeneratorTargetsType::iterator l = tgts.begin();
- l != tgts.end(); l++)
- {
- if (l->first->IsImported())
- {
- continue;
- }
- cmGeneratorTarget& target = *l->second;
- switch(target.GetType())
- {
- case cmTarget::STATIC_LIBRARY:
- case cmTarget::SHARED_LIBRARY:
- case cmTarget::MODULE_LIBRARY:
- case cmTarget::EXECUTABLE:
- {
- std::string llang = target.Target->GetLinkerLanguage();
- if(llang.empty())
- {
- cmSystemTools::Error
- ("CMake can not determine linker language for target: ",
- target.Target->GetName().c_str());
- return;
- }
- // if the language is not in the set lang then create custom
- // commands to build the target
- if(lang.count(llang) == 0)
- {
- this->AddBuildTargetRule(llang, target);
- }
- }
- break;
- default:
- break;
- }
- }
-}
-
// List of variables that are replaced when
// rules are expanced. These variables are
// replaced in the form <var> with GetSafeDefinition(var).
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 2dfe825..fee2420 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -338,12 +338,6 @@ protected:
const std::string& lang,
cmSourceFile& source,
cmGeneratorTarget& target);
- // Create Custom Targets and commands for unsupported languages
- // The set passed in should contain the languages supported by the
- // generator directly. Any targets containing files that are not
- // of the types listed will be compiled as custom commands and added
- // to a custom target.
- void CreateCustomTargetsAndCommands(std::set<std::string> const&);
// Handle old-style install rules stored in the targets.
void GenerateTargetInstallRules(
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 9263053..f1c8def 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -82,14 +82,6 @@ private:
std::string Event;
};
-void cmLocalVisualStudio6Generator::AddHelperCommands()
-{
- std::set<std::string> lang;
- lang.insert("C");
- lang.insert("CXX");
- this->CreateCustomTargetsAndCommands(lang);
-}
-
void cmLocalVisualStudio6Generator::AddCMakeListsRules()
{
cmTargets &tgts = this->Makefile->GetTargets();
diff --git a/Source/cmLocalVisualStudio6Generator.h b/Source/cmLocalVisualStudio6Generator.h
index 8f4d521..a44e61d 100644
--- a/Source/cmLocalVisualStudio6Generator.h
+++ b/Source/cmLocalVisualStudio6Generator.h
@@ -35,7 +35,6 @@ public:
virtual ~cmLocalVisualStudio6Generator();
- virtual void AddHelperCommands();
virtual void AddCMakeListsRules();
/**
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index bf82c87..f199a41 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -68,15 +68,6 @@ cmLocalVisualStudio7Generator::~cmLocalVisualStudio7Generator()
void cmLocalVisualStudio7Generator::AddHelperCommands()
{
- std::set<std::string> lang;
- lang.insert("C");
- lang.insert("CXX");
- lang.insert("RC");
- lang.insert("IDL");
- lang.insert("DEF");
- lang.insert("Fortran");
- this->CreateCustomTargetsAndCommands(lang);
-
// Now create GUIDs for targets
cmTargets &tgts = this->Makefile->GetTargets();