mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 14:08:35 +08:00
ENH: add an option to configure file command that allows for only expansion of at variables and not dollar variables
This commit is contained in:
@@ -53,6 +53,7 @@ bool cmConfigureFileCommand::InitialPass(std::vector<std::string> const& args)
|
||||
m_CopyOnly = false;
|
||||
m_EscapeQuotes = false;
|
||||
m_Immediate = false;
|
||||
m_AtOnly = false;
|
||||
for(unsigned int i=2;i < args.size();++i)
|
||||
{
|
||||
if(args[i] == "COPYONLY")
|
||||
@@ -63,6 +64,10 @@ bool cmConfigureFileCommand::InitialPass(std::vector<std::string> const& args)
|
||||
{
|
||||
m_EscapeQuotes = true;
|
||||
}
|
||||
else if(args[i] == "@ONLY")
|
||||
{
|
||||
m_AtOnly = true;
|
||||
}
|
||||
else if(args[i] == "IMMEDIATE")
|
||||
{
|
||||
m_Immediate = true;
|
||||
@@ -136,8 +141,8 @@ void cmConfigureFileCommand::ConfigureFile()
|
||||
if(fin)
|
||||
{
|
||||
inLine = buffer;
|
||||
m_Makefile->ExpandVariablesInString(inLine, m_EscapeQuotes);
|
||||
m_Makefile->RemoveVariablesInString(inLine);
|
||||
m_Makefile->ExpandVariablesInString(inLine, m_EscapeQuotes, m_AtOnly);
|
||||
m_Makefile->RemoveVariablesInString(inLine, m_AtOnly);
|
||||
// look for special cmakedefine symbol and handle it
|
||||
// is the symbol defined
|
||||
if (cmdefine.find(inLine))
|
||||
|
Reference in New Issue
Block a user