summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2003-10-16 14:10:49 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2003-10-16 14:10:49 (GMT)
commit073a5b69b72ee04fab9fa3253c113f9531798c66 (patch)
treee6f9a27a2b260c4783af63bf9c135d90b008b2a5
parent2ff23530792aa649d5a5a279b55f0547f5beba0d (diff)
downloadCMake-073a5b69b72ee04fab9fa3253c113f9531798c66.zip
CMake-073a5b69b72ee04fab9fa3253c113f9531798c66.tar.gz
CMake-073a5b69b72ee04fab9fa3253c113f9531798c66.tar.bz2
ENH: allow users to change to unicode
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx28
1 files changed, 20 insertions, 8 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 18be630..ce69b98 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -244,14 +244,6 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
break;
}
- fout << "\t\t\tIntermediateDirectory=\".\\" << configName << "\"\n"
- << "\t\t\tConfigurationType=\"" << configType << "\"\n"
- << "\t\t\tUseOfMFC=\"" << mfcFlag << "\"\n"
- << "\t\t\tATLMinimizesCRunTimeLibraryUsage=\"FALSE\"\n"
- << "\t\t\tCharacterSet=\"2\">\n";
- fout << "\t\t\t<Tool\n"
- << "\t\t\t\tName=\"VCCLCompilerTool\"\n"
- << "\t\t\t\tAdditionalOptions=\"";
std::string flags;
std::string flagsRelease = " ";
std::string flagsMinSize = " ";
@@ -329,6 +321,26 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
flags += flagsDebugRel;
}
+ fout << "\t\t\tIntermediateDirectory=\".\\" << configName << "\"\n"
+ << "\t\t\tConfigurationType=\"" << configType << "\"\n"
+ << "\t\t\tUseOfMFC=\"" << mfcFlag << "\"\n"
+ << "\t\t\tATLMinimizesCRunTimeLibraryUsage=\"FALSE\"\n";
+ // 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 )
+ {
+ fout << "\t\t\tCharacterSet=\"1\">\n";
+ }
+ else
+ {
+ fout << "\t\t\tCharacterSet=\"2\">\n";
+ }
+
+ fout << "\t\t\t<Tool\n"
+ << "\t\t\t\tName=\"VCCLCompilerTool\"\n"
+ << "\t\t\t\tAdditionalOptions=\"";
+
cmSystemTools::ReplaceString(flags, "\"", "&quot;");
fout << flags;