summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2013-12-05 05:17:24 (GMT)
committerBrad King <brad.king@kitware.com>2013-12-09 15:29:43 (GMT)
commit0b9906c2fba3fa7d2aebc5e217da31cd129b2bfc (patch)
tree512d1177b107bba94ddd7b016530f0c6a140b531 /Source/cmGlobalVisualStudio7Generator.cxx
parentce598cc838c717132a122a97c5e21b99f11fe23b (diff)
downloadCMake-0b9906c2fba3fa7d2aebc5e217da31cd129b2bfc.zip
CMake-0b9906c2fba3fa7d2aebc5e217da31cd129b2bfc.tar.gz
CMake-0b9906c2fba3fa7d2aebc5e217da31cd129b2bfc.tar.bz2
Windows: Use wide-character system APIs
Make CMake compile with -DUNICODE. Make it possible for the 8 bit encoding to eventually be UTF-8 instead ANSI.
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 25fe10b..a217d8c 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -16,6 +16,7 @@
#include "cmLocalVisualStudio7Generator.h"
#include "cmMakefile.h"
#include "cmake.h"
+#include <cmsys/Encoding.hxx>
cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator(
const char* platformName)
@@ -897,11 +898,11 @@ void cmGlobalVisualStudio7Generator::CreateGUID(const char* name)
}
std::string ret;
UUID uid;
- unsigned char *uidstr;
+ unsigned short *uidstr;
UuidCreate(&uid);
- UuidToString(&uid,&uidstr);
- ret = reinterpret_cast<char*>(uidstr);
- RpcStringFree(&uidstr);
+ UuidToStringW(&uid,&uidstr);
+ ret = cmsys::Encoding::ToNarrow(reinterpret_cast<wchar_t*>(uidstr));
+ RpcStringFreeW(&uidstr);
ret = cmSystemTools::UpperCase(ret);
this->CMakeInstance->AddCacheEntry(guidStoreName.c_str(),
ret.c_str(), "Stored GUID",