[cmake-developers] Patches for Visual Studio multi-CPU architecture project generation and a Windows-Phone-8 generator

Patrick Gansterer paroga at paroga.com
Thu Oct 17 03:42:25 EDT 2013


On 16.10.2013, at 15:06, Brad King wrote:

> On 10/16/2013 03:57 AM, Paul Annetts wrote:
>> Brad King asked me to refactor out the multi-CPU architecture
>> (platform) part
> [snip]
>> https://github.com/paulannetts/CMake/tree/vs11MultiPlatform
>> https://github.com/paulannetts/CMake/tree/windows-phone-8
> 
> Great, thanks for working on this!  It looks like a great start.
> 
> Why do you need the dedicated multi-platform target generator?
> Can't the normal cmVisualStudio10TargetGenerator be taught to
> support multiple platforms and just "loop" over a single platform
> when needed?
> 
>> - It's based off of the July 12 Nightly build so quite old
> 
> Patrick, you've touched the relevant generator creation code most
> recently.  Please take a look at this topic when you get a chance.
> I think you've made changes since July that will conflict with
> this topic.

I see no conflict with my changes, but have a more general problem with the current version of the patch (unfortunately!!).
If i read the patch correctly the following snippet will never fail with the multi platform stuff:
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
    message(FATAL_ERROR "Building x64")
endif()

That might not be a big problem for most projects, but from my experience 95% of the CMake project link against a 3rd party library with find_package() which are different on x86/x64/ARM/... platform.
I'm against adding this feature until this problem is solved, since it adds no real benefit compared to the confusion for users with their expectations. :-(

@windows-phone-8: Why does it depend on the multi platform stuff? Is it possible that it's only needed to bypass the correct platform detection? Otherwise it shouldn't be a problem to add the "Windows-Phone-8" generator like the Windows CE ones. Since the platform name for Windows-Phone 8 seams to be the same like for the desktop versions (compared to WinCE where they need to match a specific installed SDK name) it might be enough for the user to set CMAKE_GENERATOR_TOOLSET to "v110_wp80"?

-- Patrick


More information about the cmake-developers mailing list