[cmake-developers] [PATCH] WINCE, VS: Allow selecting an SDK for Windows CE on Visual Studio
Brad King
brad.king at kitware.com
Fri Sep 5 09:59:42 EDT 2014
On 09/05/2014 09:16 AM, Bach, Pascal wrote:
> I'm not clear what you mean.
> As far as I understand the solution files that do try compile
> are generated using the same generator that generates the
> final solution file.
A generator with the same name is used but it is not the same
instance of cmGlobalGenerator. See cmMakefile::TryCompile:
http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmMakefile.cxx;hb=v3.0.1#l3080
It creates a new generator, but also does cm.SetIsInTryCompile(true)
on the temporary try_compile cmake instance. That tells the
generator's EnableLanguage method to load settings for languages
from the existing files created by the outer generator.
The try_compile generator is explicitly given the toolset:
cm.SetGeneratorToolset(this->GetCMakeInstance()->GetGeneratorToolset());
but the rest of the information (e.g. CMAKE_SYSTEM_NAME) gets
loaded from CMakeFiles/<cm-version>/CMakeSystem.cmake and a few
per-language files. The CMAKE_VS_WINCE_SDK value (or whatever more
general name we choose) will have to go through here too.
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?
On 09/05/2014 09:18 AM, Bach, Pascal wrote:
> (I hope the resubmission is OK like this)
Yes, revised patch resubmissions are just right.
Thanks,
-Brad
More information about the cmake-developers
mailing list