summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-04-08 20:06:44 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-04-08 20:06:44 (GMT)
commit5a079b151a029a7c5bdea3baea9691f3be52c616 (patch)
tree2fefbe1429412434160a8045132448cfc2a5e512 /Source/cmSystemTools.cxx
parentcec897edc43de3504b0c8bf7ed6c762a176004f0 (diff)
downloadCMake-5a079b151a029a7c5bdea3baea9691f3be52c616.zip
CMake-5a079b151a029a7c5bdea3baea9691f3be52c616.tar.gz
CMake-5a079b151a029a7c5bdea3baea9691f3be52c616.tar.bz2
BUG: half fix for 6688, expand registry stuff on unix just like it was not found on windows
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index f6d8e6c..ee5da68 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -149,8 +149,19 @@ void cmSystemTools::ExpandRegistryValues(std::string& source)
}
}
#else
-void cmSystemTools::ExpandRegistryValues(std::string&)
+void cmSystemTools::ExpandRegistryValues(std::string& source)
{
+ cmsys::RegularExpression regEntry("\\[(HKEY[^]]*)\\]");
+ while (regEntry.find(source))
+ {
+ // the arguments are the second match
+ std::string key = regEntry.match(1);
+ std::string val;
+ std::string reg = "[";
+ reg += key + "]";
+ cmSystemTools::ReplaceString(source, reg.c_str(), "/registry");
+ }
+
}
#endif