summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2003-10-17 20:08:49 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2003-10-17 20:08:49 (GMT)
commit545ae439b7f388947ca59812deea9d8afa5ce951 (patch)
tree588609a7d881ac6213aed2a1e9cad70b2d363e35 /Source/cmLocalVisualStudio7Generator.cxx
parentbd588e7a55b0cad7077b45f9a7ee27036c74289f (diff)
downloadCMake-545ae439b7f388947ca59812deea9d8afa5ce951.zip
CMake-545ae439b7f388947ca59812deea9d8afa5ce951.tar.gz
CMake-545ae439b7f388947ca59812deea9d8afa5ce951.tar.bz2
BUG: fix for unicode and for /D -D
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index ce69b98..b740bb2 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -328,7 +328,9 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
// if -D_UNICODE or /D_UNICODE is found in the flags
// change the character set to unicode, if not then
// default to MBCS
- if(flags.find("D_UNICODE") != flags.npos )
+ std::string defs = m_Makefile->GetDefineFlags();
+ if(flags.find("D_UNICODE") != flags.npos ||
+ defs.find("D_UNICODE") != flags.npos)
{
fout << "\t\t\tCharacterSet=\"1\">\n";
}
@@ -692,6 +694,7 @@ void cmLocalVisualStudio7Generator::OutputLibraries(std::ostream& fout,
void cmLocalVisualStudio7Generator::OutputDefineFlags(std::ostream& fout)
{
std::string defs = m_Makefile->GetDefineFlags();
+ cmSystemTools::ReplaceString(defs, "/D","-D");
std::string::size_type pos = defs.find("-D");
bool done = pos == std::string::npos;
if(!done)