[cmake-developers] [CMake 0015733]: Linker EntryPoint inconsistency

Mantis Bug Tracker mantis at public.kitware.com
Thu Sep 10 04:12:40 EDT 2015


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15733 
====================================================================== 
Reported By:                M. Schneider
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15733
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-09-10 04:12 EDT
Last Modified:              2015-09-10 04:12 EDT
====================================================================== 
Summary:                    Linker EntryPoint inconsistency
Description: 
Inconsistency occurs for Windows CE when creating a project for building an
executable using Unicode. This causes build errors for builds using VS
generator.

Because of portability reason to standard c code, console executables on CE use
mainACRTStartup as entry point.

For Ninja Generator this linker flag is set properly (defined in
Windows-MSVC.cmake line 39ff, applied in cmMakefileExecutableTargetGenerator.cxx
199ff) depending on system name - using CMAKE_CREATE_CONSOLE_EXE variable.

If VS2012 project is set as generator entry point is set to mainWCRTStartup
(cmVisualStudio10TargetGenerator.cxx line 2396ff).

>From my point of view all generators should create same flags although VS build
can be fixed using

SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LINK_FLAGS
"/ENTRY:mainACRTStartup")

for WinCE in corresponding CMakeLists.txt.


An idea is instead of using a separate logic for determining entry point, stick
to your CMAKE_CREATE_CONSOLE_EXE/CMAKE_CREATE_WIN32_EXE variables.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-09-10 04:12 M. Schneider   New Issue                                    
======================================================================



More information about the cmake-developers mailing list