> Fixed typo in commit message:
> 
>  VS, WINCE: Fix entry point for Unicode builds
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=681cda02
> 

I figured out that the combination /ENTRY:mainCRTStartup is also possible even 
if UNICODE is enabled.

The question is now what should CMake do as default.

1) With the patch applied the behavior is as follows: The default entry points 
are mainCRTStartup (non Unicode) and mainWCRTStartup (for Unicode). So this 
means as soon as "UNICODE" is set the default Visual Studio is looking for 
wmain instead of main. If the user wants to change back to main he has to do 
something like this: set(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} 
/ENTRY:mainCRTStartup" )

2) Without my patch: The default entry point is mainCRTStartup (for both non 
Unicode and Unicode). So if UNICODE is set this doesn't change anything. If the 
user wants to use wmain he has to do something like this: 
set(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainWCRTStartup" )

I'm not sure what is better. I almost think the old behavior was better. The 
user should then be able to set the entry point independent of the UNICODE 
setting via a target property. This would be similar to how WIN32_EXECUTABLE 
selects WinMain as startup.

Any thoughts on this?

Pascal
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to