On 09/05/2014 10:02 AM, Bach, Pascal wrote: >> On 09/05/2014 09:16 AM, Bach, Pascal wrote: >> Since CMakeSystem.cmake loads the CMAKE_TOOLCHAIN_FILE, try_compile >> should use CMAKE_VS_WINCE_SDK when the value is set in the toolchain >> file. Is this the case when you test the changes locally? > > The case I was testing was indeed with the CMAKE_VS_WINCE_SDK set inside the > toolchain file. > I guess to support this variable only in the toolchain file is not an option?
It would be acceptable for purposes of the initial contribution. How this is best done in the long run may depend on how we choose to generalize (or not) the CMAKE_VS_WINCE_SDK value. Therefore we need to choose that now. If one were compiling for WinCE using a Makefile or Ninja generator, then one would need to have the current environment configured for the proper SDK already. Then the CMake generator would not need to be aware of the SDK or even its name. This is why there are "Win64" and "ARM" variants of the VS generators but not of other generators. This setting is specific to Visual Studio generators, just as the setting for CMAKE_GENERATOR_TOOLSET is generator-specific (though that one is meaningful to the Xcode generator too). Although WinCE uses it to choose the SDK, from the VS generator point of view it is just the <Platform> value. The value does for <Platform> exactly what CMAKE_GENERATOR_TOOLSET does for <PlatformToolset>. 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. Please fetch as: git fetch https://github.com/bradking/CMake vs-generator-platform and rebase your topic on that to try it out. Of course there is no need to send my part as patches, just your revised patch(es). Thanks, -Brad -- 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
