[Cmake-commits] [cmake-commits] king committed cmLocalGenerator.cxx 1.291 1.292 cmLocalGenerator.h 1.109 1.110 cmLocalUnixMakefileGenerator3.cxx 1.260 1.261
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Feb 10 08:52:09 EST 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv10026/Source
Modified Files:
cmLocalGenerator.cxx cmLocalGenerator.h
cmLocalUnixMakefileGenerator3.cxx
Log Message:
ENH: Add rule substitutions useful for launchers
This defines make rule substitutions <LANGUAGE>, <TARGET_NAME>,
<TARGET_TYPE>, and <OUTPUT>. They will be useful for RULE_LAUNCH_*
property values.
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.291
retrieving revision 1.292
diff -C 2 -d -r1.291 -r1.292
*** cmLocalGenerator.cxx 10 Feb 2009 13:51:13 -0000 1.291
--- cmLocalGenerator.cxx 10 Feb 2009 13:52:06 -0000 1.292
***************
*** 973,976 ****
--- 973,1001 ----
}
}
+ if(replaceValues.Language)
+ {
+ if(variable == "LANGUAGE")
+ {
+ return replaceValues.Language;
+ }
+ }
+ if(replaceValues.CMTarget)
+ {
+ if(variable == "TARGET_NAME")
+ {
+ return replaceValues.CMTarget->GetName();
+ }
+ if(variable == "TARGET_TYPE")
+ {
+ return cmTarget::TargetTypeNames[replaceValues.CMTarget->GetType()];
+ }
+ }
+ if(replaceValues.Output)
+ {
+ if(variable == "OUTPUT")
+ {
+ return replaceValues.Output;
+ }
+ }
if(variable == "CMAKE_COMMAND")
{
Index: cmLocalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.h,v
retrieving revision 1.109
retrieving revision 1.110
diff -C 2 -d -r1.109 -r1.110
*** cmLocalGenerator.h 10 Feb 2009 13:51:13 -0000 1.109
--- cmLocalGenerator.h 10 Feb 2009 13:52:06 -0000 1.110
***************
*** 215,218 ****
--- 215,219 ----
const char* AssemblySource;
const char* PreprocessedSource;
+ const char* Output;
const char* Object;
const char* ObjectDir;
Index: cmLocalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v
retrieving revision 1.260
retrieving revision 1.261
diff -C 2 -d -r1.260 -r1.261
*** cmLocalUnixMakefileGenerator3.cxx 10 Feb 2009 13:51:13 -0000 1.260
--- cmLocalUnixMakefileGenerator3.cxx 10 Feb 2009 13:52:07 -0000 1.261
***************
*** 1115,1118 ****
--- 1115,1125 ----
vars.RuleLauncher = prop;
vars.CMTarget = target;
+ std::string output;
+ const std::vector<std::string>& outputs = cc.GetOutputs();
+ if(!outputs.empty())
+ {
+ output = this->Convert(outputs[0].c_str(), relative, SHELL);
+ }
+ vars.Output = output.c_str();
std::string launcher;
More information about the Cmake-commits
mailing list