[cmake-developers] VS 2013 WindowsCE support

Brad King brad.king at kitware.com
Wed Sep 3 09:35:22 EDT 2014


On 09/03/2014 05:23 AM, Bach, Pascal wrote:
>>  elseif(CMAKE_VS_WINCE_VERSION)
>>    set(CMAKE_SYSTEM_NAME      "WindowsCE")
>>    set(CMAKE_SYSTEM_VERSION   "${CMAKE_VS_WINCE_VERSION}")
>>    set(CMAKE_SYSTEM_PROCESSOR "${MSVC_C_ARCHITECTURE_ID}")
> 
> Do we need to preserve the current behavior?

Yes, but only for the existing VS 11 WinCE-specific generator names.

> CMAKE_VS_WINCE_VERSION seems to be undocumented.

It is an internal implementation detail of the WinCE-specific
VS generators.

> The new way would be to set CMAKE_SYSTEM_NAME and
> CMAKE_SYSTEM_VERSION in a toolchain file.

Yes.

>> is basically a mini toolchain file.  A real toolchain file would
>> explicitly specify the values.  We would also need a new variable
>> to tell the generator which SDK to use.  Currently the info is
>> in the internal CMAKE_VS_PLATFORM_NAME variable that corresponds
>> to the platform component of the generator name.
> 
> So do you agree that the right thing would be to add a
> CMAKE_VS_PLATFORM_SDK (or CMAKE_GENERATOR_SDK ?) variable that
> the user can set?

Let's use a name specific to WindowsCE like "CMAKE_VS_WINCE_SDK",
at least for discussion and review purposes, so I can see where
the variable fits in to the generator with your changes.  Then
we can decide if there is a more general name to be used later.

> A resulting toolchain file would look something like this:
> 
> set(CMAKE_SYSTEM_NAME "WindowsCE")
> set(CMAKE_SYSTEM_VERSION "8.0") 
> set(CMAKE_SYSTEM_PROCESSOR "arm" )
> set(CMAKE_GENERATOR_TOOLSET "CE800") # I still don't know if this is needed ;)
> set(CMAKE_GENERATOR_SDK "MYSDK01")
> 
> I don't understand the purpose of CMAKE_GENERATOR_TOOLSET resp.
> CMAKE_VS_PLATFORM_TOOLSET.

The CMAKE_GENERATOR_TOOLSET is where a user-specified choice is
set/saved.  The CMAKE_VS_PLATFORM_TOOLSET is the actual toolset
that the generator will write in to the project file, and is
provided only for reference (and internal compiler id detection).
The latter may be set to a default selection that CMake VS gens
pick even when no explicit CMAKE_GENERATOR_TOOLSET is set.

> As far as I understand they are independent of the SDK selected?

I'm not familiar enough with VS+WinCE tools to know how independent
they are.

-Brad




More information about the cmake-developers mailing list