summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-07-27 18:57:39 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-07-27 19:58:47 (GMT)
commite4dc83ade5f8b44d44f21d3f90185bf0264e5d9d (patch)
treedc22e7137520226257edf296f44828281e86c59c /Source/cmLocalGenerator.cxx
parent72f43fa13ddb544f84891f14619e622baf29ae38 (diff)
downloadCMake-e4dc83ade5f8b44d44f21d3f90185bf0264e5d9d.zip
CMake-e4dc83ade5f8b44d44f21d3f90185bf0264e5d9d.tar.gz
CMake-e4dc83ade5f8b44d44f21d3f90185bf0264e5d9d.tar.bz2
cmLocalGenerator: Remove unused AddBuildTargetRule method.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx100
1 files changed, 0 insertions, 100 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 25f33d7..cce10ce 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -526,106 +526,6 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname,
);
}
-void cmLocalGenerator::AddBuildTargetRule(const std::string& llang,
- cmGeneratorTarget& target)
-{
- std::string objs;
- std::vector<std::string> objVector;
- std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
- // Add all the sources outputs to the depends of the target
- std::vector<cmSourceFile*> classes;
- target.GetSourceFiles(classes, config);
- for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
- i != classes.end(); ++i)
- {
- cmSourceFile* sf = *i;
- if(!sf->GetCustomCommand() &&
- !sf->GetPropertyAsBool("HEADER_FILE_ONLY") &&
- !sf->GetPropertyAsBool("EXTERNAL_OBJECT"))
- {
- std::string dir_max;
- dir_max += this->StateSnapshot.GetDirectory().GetCurrentBinary();
- dir_max += "/";
- std::string obj = this->GetObjectFileNameWithoutTarget(*sf, dir_max);
- if(!obj.empty())
- {
- std::string ofname =
- this->StateSnapshot.GetDirectory().GetCurrentBinary();
- ofname += "/";
- ofname += obj;
- objVector.push_back(ofname);
- this->AddCustomCommandToCreateObject(ofname.c_str(),
- llang, *(*i), target);
- objs += this->Convert(ofname,START_OUTPUT,SHELL);
- objs += " ";
- }
- }
- }
- std::string createRule = target.GetCreateRuleVariable(llang, config);
- bool useWatcomQuote = this->Makefile->IsOn(createRule+"_USE_WATCOM_QUOTE");
- std::string targetName = target.Target->GetFullName();
- // Executable :
- // Shared Library:
- // Static Library:
- // Shared Module:
- std::string linkLibs; // should be set
- std::string frameworkPath;
- std::string linkPath;
- std::string flags; // should be set
- std::string linkFlags; // should be set
- this->GetTargetFlags(linkLibs, frameworkPath, linkPath, flags, linkFlags,
- &target, useWatcomQuote);
- linkLibs = frameworkPath + linkPath + linkLibs;
- cmLocalGenerator::RuleVariables vars;
- vars.Language = llang.c_str();
- vars.Objects = objs.c_str();
- vars.ObjectDir = ".";
- vars.Target = targetName.c_str();
- vars.LinkLibraries = linkLibs.c_str();
- vars.Flags = flags.c_str();
- vars.LinkFlags = linkFlags.c_str();
-
- std::string langFlags;
- this->AddLanguageFlags(langFlags, llang, "");
- this->AddArchitectureFlags(langFlags, &target, llang, "");
- vars.LanguageCompileFlags = langFlags.c_str();
-
- cmCustomCommandLines commandLines;
- std::vector<std::string> rules;
- rules.push_back(this->Makefile->GetRequiredDefinition(createRule));
- std::vector<std::string> commands;
- cmSystemTools::ExpandList(rules, commands);
- for(std::vector<std::string>::iterator i = commands.begin();
- i != commands.end(); ++i)
- {
- // Expand the full command line string.
- this->ExpandRuleVariables(*i, vars);
- // Parse the string to get the custom command line.
- cmCustomCommandLine commandLine;
- std::vector<std::string> cmd = cmSystemTools::ParseArguments(i->c_str());
- commandLine.insert(commandLine.end(), cmd.begin(), cmd.end());
-
- // Store this command line.
- commandLines.push_back(commandLine);
- }
- std::string targetFullPath = target.Target->GetFullPath();
- // Generate a meaningful comment for the command.
- std::string comment = "Linking ";
- comment += llang;
- comment += " target ";
- comment += this->Convert(targetFullPath, START_OUTPUT);
- this->Makefile->AddCustomCommandToOutput(
- targetFullPath,
- objVector,
- "",
- commandLines,
- comment.c_str(),
- this->StateSnapshot.GetDirectory().GetCurrentBinary()
- );
- this->Makefile->GetSource(targetFullPath);
- target.Target->AddSource(targetFullPath);
-}
-
// List of variables that are replaced when
// rules are expanced. These variables are
// replaced in the form <var> with GetSafeDefinition(var).