浏览代码

VS: Add the entry point when compiling for WindowsCE

Set the entry point to mainACRTStartup to make sure that main()
can be found when linking the application to check the compiler.
Patrick Gansterer 13 年之前
父节点
当前提交
8e85822e2b

+ 0 - 4
Modules/CMakeCCompilerId.c.in

@@ -228,7 +228,3 @@ int main(int argc, char* argv[])
   return require;
   return require;
 }
 }
 #endif
 #endif
-
-#ifdef ADD_MAINCRTSTARTUP
-void mainCRTStartup() {}
-#endif

+ 0 - 4
Modules/CMakeCXXCompilerId.cpp.in

@@ -210,7 +210,3 @@ int main(int argc, char* argv[])
   (void)argv;
   (void)argv;
   return require;
   return require;
 }
 }
-
-#ifdef ADD_MAINCRTSTARTUP
-extern "C" void mainCRTStartup() {}
-#endif

+ 1 - 1
Modules/CMakeDetermineCompilerId.cmake

@@ -141,7 +141,7 @@ Id flags: ${testflags}
       set(id_toolset "")
       set(id_toolset "")
     endif()
     endif()
     if(CMAKE_VS_WINCE_VERSION)
     if(CMAKE_VS_WINCE_VERSION)
-      set(id_definitions "ADD_MAINCRTSTARTUP")
+      set(id_entrypoint "mainACRTStartup")
       set(id_subsystem 9)
       set(id_subsystem 9)
     else()
     else()
       set(id_subsystem 1)
       set(id_subsystem 1)

+ 1 - 1
Modules/CompilerId/VS-7.vcproj.in

@@ -24,7 +24,6 @@
 			<Tool
 			<Tool
 				Name="VCCLCompilerTool"
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				Optimization="0"
-				PreprocessorDefinitions="@id_definitions@"
 				MinimalRebuild="false"
 				MinimalRebuild="false"
 				BasicRuntimeChecks="3"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
 				RuntimeLibrary="3"
@@ -37,6 +36,7 @@
 				LinkIncremental="1"
 				LinkIncremental="1"
 				GenerateDebugInformation="false"
 				GenerateDebugInformation="false"
 				SubSystem="@id_subsystem@"
 				SubSystem="@id_subsystem@"
+				EntryPointSymbol="@id_entrypoint@"
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCPostBuildEventTool"
 				Name="VCPostBuildEventTool"