summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Gansterer <paroga@paroga.com>2013-08-05 19:23:13 (GMT)
committerPatrick Gansterer <paroga@paroga.com>2013-08-05 19:24:00 (GMT)
commit34969cf15eca97d8b24764ae725d1125b6e820be (patch)
tree6c4df3114273a45e9bb5b196418b8c61c306362e
parent5e0252ce68d9752284450ac805138afa0792c799 (diff)
downloadCMake-34969cf15eca97d8b24764ae725d1125b6e820be.zip
CMake-34969cf15eca97d8b24764ae725d1125b6e820be.tar.gz
CMake-34969cf15eca97d8b24764ae725d1125b6e820be.tar.bz2
Fix setting of the entry point symbol for Windows CE (#14088)
Set the EntryPointSymbol only when it has not been set before and use the correct symbol depending on the usage of Unicode.
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx21
-rw-r--r--Source/cmLocalVisualStudio7Generator.h2
2 files changed, 13 insertions, 10 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 672edf4..b7e30b3 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -920,7 +920,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
}
this->OutputTargetRules(fout, configName, target, libName);
- this->OutputBuildTool(fout, configName, target, targetOptions.IsDebug());
+ this->OutputBuildTool(fout, configName, target, targetOptions);
fout << "\t\t</Configuration>\n";
}
@@ -941,9 +941,7 @@ cmLocalVisualStudio7Generator
}
void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
- const char* configName,
- cmTarget &target,
- bool isDebug)
+ const char* configName, cmTarget &target, const Options& targetOptions)
{
cmGlobalVisualStudio7Generator* gg =
static_cast<cmGlobalVisualStudio7Generator*>(this->GlobalGenerator);
@@ -1111,7 +1109,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
temp += targetNamePDB;
fout << "\t\t\t\tProgramDatabaseFile=\"" <<
this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n";
- if(isDebug)
+ if(targetOptions.IsDebug())
{
fout << "\t\t\t\tGenerateDebugInformation=\"TRUE\"\n";
}
@@ -1209,7 +1207,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
fout << "\t\t\t\tProgramDatabaseFile=\""
<< path << "/" << targetNamePDB
<< "\"\n";
- if(isDebug)
+ if(targetOptions.IsDebug())
{
fout << "\t\t\t\tGenerateDebugInformation=\"TRUE\"\n";
}
@@ -1223,9 +1221,14 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
{
fout << "\t\t\t\tSubSystem=\"8\"\n";
}
- fout << "\t\t\t\tEntryPointSymbol=\""
- << (isWin32Executable ? "WinMainCRTStartup" : "mainACRTStartup")
- << "\"\n";
+
+ if(!linkOptions.GetFlag("EntryPointSymbol"))
+ {
+ const char* entryPointSymbol = targetOptions.UsingUnicode() ?
+ (isWin32Executable ? "wWinMainCRTStartup" : "mainWCRTStartup") :
+ (isWin32Executable ? "WinMainCRTStartup" : "mainACRTStartup");
+ fout << "\t\t\t\tEntryPointSymbol=\"" << entryPointSymbol << "\"\n";
+ }
}
else if ( this->FortranProject )
{
diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h
index d9e2ef0..92e4d3c 100644
--- a/Source/cmLocalVisualStudio7Generator.h
+++ b/Source/cmLocalVisualStudio7Generator.h
@@ -90,7 +90,7 @@ private:
void OutputTargetRules(std::ostream& fout, const char* configName,
cmTarget &target, const char *libName);
void OutputBuildTool(std::ostream& fout, const char* configName,
- cmTarget& t, bool debug);
+ cmTarget& t, const Options& targetOptions);
void OutputLibraryDirectories(std::ostream& fout,
std::vector<std::string> const& dirs);
void WriteProjectSCC(std::ostream& fout, cmTarget& target);