> 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.c
> xx;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.

Ok now I understand.

> 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?

Pascal
-- 

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

Reply via email to