summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-06-22 15:15:18 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-06-22 15:15:18 (GMT)
commit8609fdb051c5a277b327618070951e443b0b37ae (patch)
tree6f0bca9ef9ff776dd4f35a7f448592490f3b6a99 /Source
parent43793f7df4c540b132010eccb74b73cf010eb60a (diff)
downloadCMake-8609fdb051c5a277b327618070951e443b0b37ae.zip
CMake-8609fdb051c5a277b327618070951e443b0b37ae.tar.gz
CMake-8609fdb051c5a277b327618070951e443b0b37ae.tar.bz2
added escape quotes option
Diffstat (limited to 'Source')
-rw-r--r--Source/cmConfigureFileCommand.cxx18
-rw-r--r--Source/cmConfigureFileCommand.h14
2 files changed, 25 insertions, 7 deletions
diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx
index 6325bfb..58e40e7 100644
--- a/Source/cmConfigureFileCommand.cxx
+++ b/Source/cmConfigureFileCommand.cxx
@@ -51,12 +51,28 @@ bool cmConfigureFileCommand::InitialPass(std::vector<std::string>& args)
m_InputFile = args[0];
m_OuputFile = args[1];
m_CopyOnly = false;
+ m_EscapeQuotes = false;
if(args.size() >= 3)
{
if(args[2] == "COPYONLY")
{
m_CopyOnly = true;
}
+ if(args[2] == "ESCAPE_QUOTES")
+ {
+ m_EscapeQuotes = true;
+ }
+ }
+ if(args.size() >= 4)
+ {
+ if(args[3] == "COPYONLY")
+ {
+ m_CopyOnly = true;
+ }
+ if(args[3] == "ESCAPE_QUOTES")
+ {
+ m_EscapeQuotes = true;
+ }
}
return true;
}
@@ -102,7 +118,7 @@ void cmConfigureFileCommand::FinalPass()
inLine = buffer;
if(!m_CopyOnly)
{
- m_Makefile->ExpandVariablesInString(inLine);
+ m_Makefile->ExpandVariablesInString(inLine, m_EscapeQuotes);
m_Makefile->RemoveVariablesInString(inLine);
// look for special cmakedefine symbol and handle it
// is the symbol defined
diff --git a/Source/cmConfigureFileCommand.h b/Source/cmConfigureFileCommand.h
index 9cb5604..bc6390b 100644
--- a/Source/cmConfigureFileCommand.h
+++ b/Source/cmConfigureFileCommand.h
@@ -77,13 +77,14 @@ public:
virtual const char* GetFullDocumentation()
{
return
- "CONFIGURE_FILE(InputFile OutputFile [COPYONLY])\n"
+ "CONFIGURE_FILE(InputFile OutputFile [COPYONLY] [ESCAPE_QUOTES])\n"
"The Input and Ouput files have to have full paths.\n"
- "They can also use variables like CMAKE_BINARY_DIR,CMAKE_SOURCE_DIR.\n"
- "This command replaces any variables in the input file with their\n"
- "values as determined by CMake. If a variables in not defined, it\n"
- "will be replaced with nothing. If COPYONLY is passed in, then\n"
- "then no varible expansion will take place.\n";
+ "They can also use variables like CMAKE_BINARY_DIR,CMAKE_SOURCE_DIR. "
+ "This command replaces any variables in the input file with their "
+ "values as determined by CMake. If a variables in not defined, it "
+ "will be replaced with nothing. If COPYONLY is passed in, then "
+ "then no varible expansion will take place. If ESCAPE_QUOTES is "
+ "passed in then any substitued quotes will be C style escaped.";
}
/**
@@ -95,6 +96,7 @@ private:
std::string m_InputFile;
std::string m_OuputFile;
bool m_CopyOnly;
+ bool m_EscapeQuotes;
};