On 17.02.2013 08:36, Patrick Gansterer wrote:
Hi,

Am 09.02.2013 um 10:39 schrieb Peter Kümmel:

On 30.01.2013 15:17, Brad King wrote:
On 01/26/2013 12:33 PM, Patrick Gansterer wrote:
to compile WindowsCE C++ project with Ninja I need the attached patch
applied.

One problem with this patch is that it moves the initialization of C
and CXX languages until after the RC initialization which tries to
match the location of the C/CXX compilers.  Have a look at these:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e3a1f727
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6547f369

Peter, can you explain why this is needed for Ninja but not the
other generators?  Why does the logic belong in that method?

Thanks,
-Brad


It wasn't clear to me why it works with other generators so I
patched only the ninja code. Maybe there is a better solution,
but I couldn't figure it out.

But the current Ninja generator does not work. Any variables not set in 
Modules/CMakeCCompiler.cmake.in get no value. E.g. SET_MSVC_CXX_ARCHITECTURE_ID 
stays empty, because it's set it Modules/CMakeCXXCompiler.cmake.in. Since the 
all other generators work it seams to my like a Ninja problem, where 
EnableLanguage() of the base class isn't called correctly.

-- Patrick


I'm sorry, but atm I have absolutely not time to fix this issue. And I could not simply apply your patch because it could have side effects which introduce other bugs, things
are not very decoupled in cmake's code base.

If you have time, try to figure out the cmake way of enabling a language and 
rewrite
void cmGlobalNinjaGenerator::EnableLanguage().

There are two related tickets for this:

http://www.cmake.org/Bug/view.php?id=13903
http://www.cmake.org/Bug/view.php?id=13606


Peter
--

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

Reply via email to