> -----Original Message-----
> From: Brad King [mailto:brad.k...@kitware.com]
> Sent: Mittwoch, 3. September 2014 15:35
> To: Bach, Pascal
> Cc: cmake-developers@cmake.org; Patrick Roland Gansterer
> Subject: Re: VS 2013 WindowsCE support
> 
> 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.

I'm not sure this is really Windows CE specific. There is already an internal 
variable CMAKE_VS_PLATFORM_NAME that is set to Win32, Win64, ARM etc. This is 
also the variable that gets set to the SDK name. Currently this variable is set 
based on the Generator used, but there is also some other magic going on for 
example for Itanium.

Would it be desirable to be able to override this value independent of the 
generator used?

> > 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.

Based on your explanation and my findings above, the CMAKE_VS_PLATFORM_NAME 
variable should behave analogues to CMAKE_VS_PLATFORM_TOOLSET but I can't come 
up with a good name for a variable the user should set.

One way would be to just allow setting CMAKE_VS_PLATFORM_NAME and override the 
whole logic if it is set.

Any thoughts?

> 
> > 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.

As far as I can tell they are, at least you can change both values in visual 
studio independently. If the result works is another question.

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