diff options
author | Brad King <brad.king@kitware.com> | 2009-02-10 13:52:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-02-10 13:52:07 (GMT) |
commit | 15c52e98913b68270be8af1aa0288604c302866b (patch) | |
tree | 76e046ce8fa22a2caac6b1874ad805935896a515 /Source/cmLocalGenerator.cxx | |
parent | b604b98c5690c49109ad464190c1b8a7562410b0 (diff) | |
download | CMake-15c52e98913b68270be8af1aa0288604c302866b.zip CMake-15c52e98913b68270be8af1aa0288604c302866b.tar.gz CMake-15c52e98913b68270be8af1aa0288604c302866b.tar.bz2 |
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.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 8555064..0f1c4ee 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -972,6 +972,31 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable, return replaceValues.LinkLibraries; } } + 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") { const char* cmcommand = |