[Cmake-commits] [cmake-commits] king committed cmMakefileTargetGenerator.cxx 1.110 1.111
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Feb 2 13:28:19 EST 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv25934/Source
Modified Files:
cmMakefileTargetGenerator.cxx
Log Message:
BUG: Do not expand rule variables in info rules
Previously the makefile generator would expand rule variables even on
its progress and echo commands for object compilation rules (but not for
link rules). This fixes the implementation to only expand rule
variables on user-specified rules.
Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.110
retrieving revision 1.111
diff -C 2 -d -r1.110 -r1.111
*** cmMakefileTargetGenerator.cxx 2 Feb 2009 18:28:12 -0000 1.110
--- cmMakefileTargetGenerator.cxx 2 Feb 2009 18:28:17 -0000 1.111
***************
*** 602,622 ****
cmLocalUnixMakefileGenerator3::EchoBuild);
- // Construct the compile rules.
- std::string compileRuleVar = "CMAKE_";
- compileRuleVar += lang;
- compileRuleVar += "_COMPILE_OBJECT";
- std::string compileRule =
- this->Makefile->GetRequiredDefinition(compileRuleVar.c_str());
- std::vector<std::string> compileCommands;
- cmSystemTools::ExpandListArgument(compileRule, compileCommands);
-
- // Change the command working directory to the local build tree.
- this->LocalGenerator->CreateCDCommand
- (compileCommands,
- this->Makefile->GetStartOutputDirectory(),
- cmLocalGenerator::HOME_OUTPUT);
- commands.insert(commands.end(),
- compileCommands.begin(), compileCommands.end());
-
std::string targetOutPathPDB;
{
--- 602,605 ----
***************
*** 653,663 ****
vars.Defines = defines.c_str();
// Expand placeholders in the commands.
! for(std::vector<std::string>::iterator i = commands.begin();
! i != commands.end(); ++i)
{
this->LocalGenerator->ExpandRuleVariables(*i, vars);
}
// Write the rule.
--- 636,664 ----
vars.Defines = defines.c_str();
+ // Construct the compile rules.
+ {
+ std::string compileRuleVar = "CMAKE_";
+ compileRuleVar += lang;
+ compileRuleVar += "_COMPILE_OBJECT";
+ std::string compileRule =
+ this->Makefile->GetRequiredDefinition(compileRuleVar.c_str());
+ std::vector<std::string> compileCommands;
+ cmSystemTools::ExpandListArgument(compileRule, compileCommands);
+
// Expand placeholders in the commands.
! for(std::vector<std::string>::iterator i = compileCommands.begin();
! i != compileCommands.end(); ++i)
{
this->LocalGenerator->ExpandRuleVariables(*i, vars);
}
+ // Change the command working directory to the local build tree.
+ this->LocalGenerator->CreateCDCommand
+ (compileCommands,
+ this->Makefile->GetStartOutputDirectory(),
+ cmLocalGenerator::HOME_OUTPUT);
+ commands.insert(commands.end(),
+ compileCommands.begin(), compileCommands.end());
+ }
// Write the rule.
***************
*** 723,726 ****
--- 724,735 ----
std::vector<std::string> preprocessCommands;
cmSystemTools::ExpandListArgument(preprocessRule, preprocessCommands);
+
+ // Expand placeholders in the commands.
+ for(std::vector<std::string>::iterator i = preprocessCommands.begin();
+ i != preprocessCommands.end(); ++i)
+ {
+ this->LocalGenerator->ExpandRuleVariables(*i, vars);
+ }
+
this->LocalGenerator->CreateCDCommand
(preprocessCommands,
***************
*** 736,746 ****
cmLocalGenerator::SHELL).c_str();
vars.PreprocessedSource = shellObjI.c_str();
-
- // Expand placeholders in the commands.
- for(std::vector<std::string>::iterator i = commands.begin();
- i != commands.end(); ++i)
- {
- this->LocalGenerator->ExpandRuleVariables(*i, vars);
- }
}
else
--- 745,748 ----
***************
*** 779,782 ****
--- 781,792 ----
std::vector<std::string> assemblyCommands;
cmSystemTools::ExpandListArgument(assemblyRule, assemblyCommands);
+
+ // Expand placeholders in the commands.
+ for(std::vector<std::string>::iterator i = assemblyCommands.begin();
+ i != assemblyCommands.end(); ++i)
+ {
+ this->LocalGenerator->ExpandRuleVariables(*i, vars);
+ }
+
this->LocalGenerator->CreateCDCommand
(assemblyCommands,
***************
*** 792,802 ****
cmLocalGenerator::SHELL).c_str();
vars.AssemblySource = shellObjS.c_str();
-
- // Expand placeholders in the commands.
- for(std::vector<std::string>::iterator i = commands.begin();
- i != commands.end(); ++i)
- {
- this->LocalGenerator->ExpandRuleVariables(*i, vars);
- }
}
else
--- 802,805 ----
More information about the Cmake-commits
mailing list