diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-07-27 18:58:28 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-07-27 19:58:48 (GMT) |
commit | bbad6ba53771dc77bfdf74bab7173374084d434c (patch) | |
tree | 1940dcdc87e0cd02081f446c05efda61be2433c7 /Source | |
parent | e4dc83ade5f8b44d44f21d3f90185bf0264e5d9d (diff) | |
download | CMake-bbad6ba53771dc77bfdf74bab7173374084d434c.zip CMake-bbad6ba53771dc77bfdf74bab7173374084d434c.tar.gz CMake-bbad6ba53771dc77bfdf74bab7173374084d434c.tar.bz2 |
cmLocalGenerator: Remove unused AddCustomCommandToCreateObject method.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 78 | ||||
-rw-r--r-- | Source/cmLocalGenerator.h | 6 |
2 files changed, 0 insertions, 84 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index cce10ce..91e37c4 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -448,84 +448,6 @@ cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const return this->StateSnapshot; } -void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, - const std::string& lang, - cmSourceFile& source, - cmGeneratorTarget& target) -{ - std::string objectDir = cmSystemTools::GetFilenamePath(std::string(ofname)); - objectDir = this->Convert(objectDir,START_OUTPUT,SHELL); - std::string objectFile = this->Convert(ofname,START_OUTPUT,SHELL); - std::string sourceFile = - this->ConvertToOutputFormat(source.GetFullPath(), SHELL); - std::string varString = "CMAKE_"; - varString += lang; - varString += "_COMPILE_OBJECT"; - std::vector<std::string> rules; - rules.push_back(this->Makefile->GetRequiredDefinition(varString)); - varString = "CMAKE_"; - varString += lang; - varString += "_FLAGS"; - std::string flags; - flags += this->Makefile->GetSafeDefinition(varString); - flags += " "; - { - std::vector<std::string> includes; - this->GetIncludeDirectories(includes, &target, lang); - flags += this->GetIncludeFlags(includes, &target, lang); - } - flags += this->Makefile->GetDefineFlags(); - - // Construct the command lines. - cmCustomCommandLines commandLines; - std::vector<std::string> commands; - cmSystemTools::ExpandList(rules, commands); - cmLocalGenerator::RuleVariables vars; - vars.Language = lang.c_str(); - vars.Source = sourceFile.c_str(); - vars.Object = objectFile.c_str(); - vars.ObjectDir = objectDir.c_str(); - vars.Flags = flags.c_str(); - 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); - } - - // Check for extra object-file dependencies. - std::vector<std::string> depends; - const char* additionalDeps = source.GetProperty("OBJECT_DEPENDS"); - if(additionalDeps) - { - cmSystemTools::ExpandListArgument(additionalDeps, depends); - } - - // Generate a meaningful comment for the command. - std::string comment = "Building "; - comment += lang; - comment += " object "; - comment += this->Convert(ofname, START_OUTPUT); - - // Add the custom command to build the object file. - this->Makefile->AddCustomCommandToOutput( - ofname, - depends, - source.GetFullPath(), - commandLines, - comment.c_str(), - this->StateSnapshot.GetDirectory().GetCurrentBinary() - ); -} - // 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 429d5fc..2971574 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -328,12 +328,6 @@ protected: void InsertRuleLauncher(std::string& s, cmTarget* target, const std::string& prop); - ///! add a custom command to build a .o file that is part of a target - void AddCustomCommandToCreateObject(const char* ofname, - const std::string& lang, - cmSourceFile& source, - cmGeneratorTarget& target); - // Handle old-style install rules stored in the targets. void GenerateTargetInstallRules( std::ostream& os, const std::string& config, |