diff options
author | Ken Martin <ken.martin@kitware.com> | 2001-06-22 15:14:32 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2001-06-22 15:14:32 (GMT) |
commit | 43793f7df4c540b132010eccb74b73cf010eb60a (patch) | |
tree | a93b9da3a78d29eec5fede01957ce426ae854ed2 /Source/cmMakefile.cxx | |
parent | b977136904223e1763414527683ff4a4891a5549 (diff) | |
download | CMake-43793f7df4c540b132010eccb74b73cf010eb60a.zip CMake-43793f7df4c540b132010eccb74b73cf010eb60a.tar.gz CMake-43793f7df4c540b132010eccb74b73cf010eb60a.tar.bz2 |
added escape quotes option in replace strings
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index acd18c8..210007b 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -752,19 +752,30 @@ int cmMakefile::DumpDocumentationToFile(const char *fileName) void cmMakefile::ExpandVariablesInString(std::string& source) const { + this->ExpandVariablesInString(source, false); +} + +void cmMakefile::ExpandVariablesInString(std::string& source, + bool escapeQuotes) const +{ for(DefinitionMap::const_iterator i = m_Definitions.begin(); i != m_Definitions.end(); ++i) { + std::string replace = (*i).second; + if (escapeQuotes) + { + replace = cmSystemTools::EscapeQuotes(replace.c_str()); + } std::string variable = "${"; variable += (*i).first; variable += "}"; cmSystemTools::ReplaceString(source, variable.c_str(), - (*i).second.c_str()); + replace.c_str()); variable = "@"; variable += (*i).first; variable += "@"; cmSystemTools::ReplaceString(source, variable.c_str(), - (*i).second.c_str()); + replace.c_str()); } } |