[cmake-developers] [PATCH] WINCE, VS: Allow selecting an SDK for Windows CE on Visual Studio

Brad King brad.king at kitware.com
Thu Sep 11 11:47:37 EDT 2014


On 09/05/2014 03:53 PM, Brad King wrote:
> I think "CMAKE_GENERATOR_PLATFORM" may be a suitable name.  Ideally
> this setting should be added as a general-purpose replacement for
> putting "ARM" or "Win64" in the generator name.  The changes for
> that are more sweeping than I'd like to ask of you just for WinCE
> support, so I drafted them myself.

This is now in 'master'.

On 09/04/2014 06:42 AM, Bach, Pascal wrote:
>> At the beginning of this block you should check/reject when
>> the generator name specified a platform name.  Something like:
>>
>>     if(this->PlatformName != "Win32")
>>       {
>>       cmOStringStream e;
>>       e << "CMAKE_SYSTEM_NAME is 'WindowsCE' but CMAKE_GENERATOR "
>>         << "specifies a platform too: '" << this->GetName() << "'";
>>       mf->IssueMessage(cmake::FATAL_ERROR, e.str());
>>       return false;
>>       }
>
> This won't' work as the code gets called multiple times

Along with the above changes I also made SetSystemName not
get called more than once.  The "PlatformName" member is
now "DefaultPlatformName".  Initially it corresponds to the
default based on the generator name, so you should be able
to check it as shown above.

SetSystemName can modify DefaultPlatformName for specific
systems to have a different default in case
CMAKE_GENERATOR_PLATFORM is not set.  The value of that
setting is then processed by SetGeneratorPlatform.

-Brad



More information about the cmake-developers mailing list