<html>
<head>
<meta name="generator" content="Windows Mail 17.5.9600.20279">
<style><!--
.EmailQuote {
margin-left:1pt;
padding-left:4pt;
border-left:#800000 2px solid;
}
--></style><style data-externalstyle="true"><!--
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}
p.MsoNormal, li.MsoNormal, div.MsoNormal {
margin:0in;
margin-bottom:.0001pt;
}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst, 
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle, 
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
--></style></head>
<body dir="ltr">
<div data-externalstyle="false" dir="ltr" style="font-family: 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif';font-size:12pt;"><div>Hi Patrick,</div><div data-signatureblock="true"><br></div><div style='color: rgb(0, 0, 0); font-family: "Color Emoji", "Calibri", "Segoe UI", "Meiryo", "Microsoft YaHei UI", "Microsoft JhengHei UI", "Malgun Gothic", "sans-serif"; font-size: 16px;' data-signatureblock="true">Any multi-CPU arch generator which tries to at one point during the CMAKE configure step to determine endianess or sizeof(T*) is always going to get the answer wrong for one or more of those architectures. It is not difficult to find out these values from the compiler or standard C/C++. However such a generator will share a common API across the CPU archs and so have the potential to add significant user benefit.</div><div style='color: rgb(0, 0, 0); font-family: "Color Emoji", "Calibri", "Segoe UI", "Meiryo", "Microsoft YaHei UI", "Microsoft JhengHei UI", "Malgun Gothic", "sans-serif"; font-size: 16px;' data-signatureblock="true"><br></div><div style='color: rgb(0, 0, 0); font-family: "Color Emoji", "Calibri", "Segoe UI", "Meiryo", "Microsoft YaHei UI", "Microsoft JhengHei UI", "Malgun Gothic", "sans-serif"; font-size: 16px;' data-signatureblock="true">My experience is that WP8 benefits greatly from multi-platform support, so that practical usage of CMAKE is kept simple and flexible for end users. In my opinion this outweighs the theoretical benefit of find_package() for WP8 (for a sum total of 0 current compatible binaries).</div><div style='color: rgb(0, 0, 0); font-family: "Color Emoji", "Calibri", "Segoe UI", "Meiryo", "Microsoft YaHei UI", "Microsoft JhengHei UI", "Malgun Gothic", "sans-serif"; font-size: 16px;' data-signatureblock="true"><br></div><div style='color: rgb(0, 0, 0); font-family: "Color Emoji", "Calibri", "Segoe UI", "Meiryo", "Microsoft YaHei UI", "Microsoft JhengHei UI", "Malgun Gothic", "sans-serif"; font-size: 16px;' data-signatureblock="true">​However on balance I don’t think adding multi-platform to the general VS toolchain adds any value. For example there’s no point in compiling CMAKE for x64 as it doesn't need to address > 4GB RAM and it won't even be possible to compile it for ARM as CMAKE can’t run under Windows 8 RT.</div><div><br></div><div>Paul.<br></div><div style="padding-top: 5px; border-top-color: rgb(229, 229, 229); border-top-width: 1px; border-top-style: solid;"><div><font face=" 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif'" style='line-height: 15pt; letter-spacing: 0.02em; font-family: "Calibri", "Segoe UI", "Meiryo", "Microsoft YaHei UI", "Microsoft JhengHei UI", "Malgun Gothic", "sans-serif"; font-size: 12pt;'><b>From:</b> <a href="mailto:paroga@paroga.com" target="_parent">'Patrick Gansterer'</a><br><b>Sent:</b> ‎Friday‎, ‎18‎ ‎October‎ ‎2013 ‎15‎:‎48<br><b>To:</b> <a href="mailto:paul@lightunobscured.com" target="_parent">Paul Annetts</a><br><b>Cc:</b> <a href="mailto:brad.king@kitware.com" target="_parent">'Brad King'</a>, <a href="mailto:cmake-developers@cmake.org" target="_parent">cmake-developers@cmake.org</a></font></div></div><div><br></div><div dir="">
<div class="PlainText">On 18.10.2013, at 15:39, Paul Annetts wrote:<br>
> Dealing with your points:<br>
> PATRICK:<br>
>> if(CMAKE_SIZEOF_VOID_P EQUAL 8)<br>
>>  message(FATAL_ERROR "Building x64")<br>
>> endif()<br>
> <br>
> Could easily be replaced with some form of compiler capability detection<br>
> then at compile time using static_assert. That would have the advantage of<br>
> using standard language features where they are available.<br>
>        static_assert(sizeof(void *) == 4, "64-bit code generation is not<br>
> supported.");<br>
>        From <<a href="http://msdn.microsoft.com/en-us/library/vstudio/dd293588.aspx" target="_parent">http://msdn.microsoft.com/en-us/library/vstudio/dd293588.aspx</a>><br>
> <br>
> <br>
> Once you know from a CMAKE perspective that you are in a known API set such<br>
> as Windows Phone, it is quite straightforward to use language features or<br>
> compiler macros rather than CMAKE macros to detect the CPU architecture, the<br>
> difference in endianness etc.<br>
<br>
I know. ;-) I only wanted to show you a simple CMake code which does not work with your multi-platform patch. It might work for some projects (without such checks, find_package(), ...), but not in general.<br>
<br>
> PATRICK:<br>
>> @windows-phone-8: Why does it depend on the multi platform stuff? Is it<br>
> possible that it's only <br>
>> needed to bypass the correct platform detection? Otherwise it shouldn't be<br>
> a problem to add <br>
>> the "Windows-Phone-8" generator like the Windows CE ones. Since the<br>
> platform name for <br>
>> Windows-Phone 8 seams to be the same like for the desktop versions<br>
> (compared to WinCE <br>
>> where they need to match a specific installed SDK name) it might be enough<br>
> for the user to set <br>
>> CMAKE_GENERATOR_TOOLSET to "v110_wp80"?<br>
> <br>
> It’s not enough to set v110_wp80 as the default linker settings in<br>
> particular are quite different (e.g. there is no kernel.lib in Windows<br>
> Phone).<br>
<br>
The important part of my statement was "for the" user: If the user sets the toolset to a Windwos Phone one CMake can detect that and do not link against kernel.lib (and all other standard libs).<br>
<br>
-- Patrick<br>
<br>
</div>


</div></div>
</body>
</html>