From 67ddd0c837172760c62850a8893eec74d416147e Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Mon, 9 Feb 2009 08:25:55 -0500 Subject: BUG: fix for 0008378, lists with FILEPATH and UNC //server/path fail --- Source/cmCacheManager.cxx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 52cb448..06e84c4 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -784,7 +784,24 @@ void cmCacheManager::AddCacheEntry(const char* key, // make sure we only use unix style paths if(type == FILEPATH || type == PATH) { - cmSystemTools::ConvertToUnixSlashes(e.Value); + if(e.Value.find(';') != e.Value.npos) + { + std::vector paths; + cmSystemTools::ExpandListArgument(e.Value, paths); + const char* sep = ""; + for(std::vector::iterator i = paths.begin(); + i != paths.end(); ++i) + { + cmSystemTools::ConvertToUnixSlashes(*i); + e.Value += sep; + e.Value += *i; + sep = ";"; + } + } + else + { + cmSystemTools::ConvertToUnixSlashes(e.Value); + } } if ( helpString ) { -- cgit v0.12