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

-- 

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