MantisBT - CMake
View Issue Details
0015115CMakeCMakepublic2014-08-28 13:162015-03-02 08:57
Pascal Bach 
Brad King 
normalmajoralways
closedfixed 
Visual Studio 2013Windows7
CMake 3.0.1 
CMake 3.1CMake 3.1 
0015115: WindowsCE: /SUBSYSTEM and /ENTRYPOINT does not end up in the generated Visual Studio project
If CMake is used for WEC2013 the file Windows-MSVC.cmake [1] sets the linker flags /subsystem and /entry.

However these variables never end up in the generated visual studio solution.
My obesrvation is that the subsystem gets always overriden by cmVisualStudio10TargetGenerator.cxx [2].

[1] https://github.com/Kitware/CMake/blob/1f8cfc3b5f4bd87216e48c6bf909b59f10b9065e/Modules/Platform/Windows-MSVC.cmake#L39 [^]
[2] https://github.com/Kitware/CMake/blob/8c30014982345567b80ec0dad6bd9eb40dfda505/Source/cmVisualStudio10TargetGenerator.cxx#L1981 [^]
1. Create a toolchain file with the following content:

set(CMAKE_SYSTEM_NAME "WindowsCE")
set(CMAKE_SYSTEM_VERSION "8.0")
set(CMAKE_SYSTEM_PROCESSOR "arm" )
set(CMAKE_GENERATOR_TOOLSET "CE800")

2. Generate a Visual Studio 2012 or 2013 solution.

Expected result:
the XML tags <Subsystem> and <EntryPointSymbol> are set to the values given in Windows-MSVC.cmake

Actual Result:
the values are to ones hardcoded in cmVisualStudio10TargetGenerator.cxx
No tags attached.
patch 0001-WINCE-VS-Propagate-Subsystem-and-Entry-point-to-gene.patch (3,615) 2014-09-05 09:56
https://public.kitware.com/Bug/file/5243/0001-WINCE-VS-Propagate-Subsystem-and-Entry-point-to-gene.patch
patch 0002-VS-Pass-MSVC-compiler-flags-in-upper-case.patch (6,299) 2014-09-05 09:57
https://public.kitware.com/Bug/file/5244/0002-VS-Pass-MSVC-compiler-flags-in-upper-case.patch
Issue History
2014-08-28 13:16Pascal BachNew Issue
2014-08-28 20:49Brad KingTarget Version => CMake 3.1
2014-09-02 10:49Brad KingNote Added: 0036698
2014-09-05 09:56Pascal BachFile Added: 0001-WINCE-VS-Propagate-Subsystem-and-Entry-point-to-gene.patch
2014-09-05 09:57Pascal BachFile Added: 0002-VS-Pass-MSVC-compiler-flags-in-upper-case.patch
2014-09-15 11:02Brad KingNote Added: 0036801
2014-09-15 11:46Brad KingAssigned To => Brad King
2014-09-15 11:46Brad KingStatusnew => resolved
2014-09-15 11:46Brad KingResolutionopen => fixed
2014-09-15 11:46Brad KingFixed in Version => CMake 3.1
2015-03-02 08:57Robert MaynardNote Added: 0038121
2015-03-02 08:57Robert MaynardStatusresolved => closed

Notes
(0036698)
Brad King   
2014-09-02 10:49   
Related mailing list thread with patch to enable Win CE platforms with the VS 12 (2013) generator:

 VS12: Allow specifying an installed SDK as target platform for the generator.
 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10708 [^]
(0036801)
Brad King   
2014-09-15 11:02   
Is this addressed by

 VS: Teach VS >= 10 generator about Windows CE
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a3298f77 [^]

?
(0038121)
Robert Maynard   
2015-03-02 08:57   
Closing resolved issues that have not been updated in more than 4 months.