On 18.10.2013, at 15:39, Paul Annetts wrote: > Dealing with your points: > PATRICK: >> if(CMAKE_SIZEOF_VOID_P EQUAL 8) >> message(FATAL_ERROR "Building x64") >> endif() > > Could easily be replaced with some form of compiler capability detection > then at compile time using static_assert. That would have the advantage of > using standard language features where they are available. > static_assert(sizeof(void *) == 4, "64-bit code generation is not > supported."); > From <http://msdn.microsoft.com/en-us/library/vstudio/dd293588.aspx> > > > Once you know from a CMAKE perspective that you are in a known API set such > as Windows Phone, it is quite straightforward to use language features or > compiler macros rather than CMAKE macros to detect the CPU architecture, the > difference in endianness etc.
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. > PATRICK: >> @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"? > > It’s not enough to set v110_wp80 as the default linker settings in > particular are quite different (e.g. there is no kernel.lib in Windows > Phone). 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). -- Patrick -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers