[cmake-developers] Ninja passes all tests on OS X

Nicolas Desprès nicolas.despres at gmail.com
Wed Jul 18 05:58:39 EDT 2012


On Tue, Jul 17, 2012 at 11:39 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> On 7/17/2012 1:43 PM, Peter Kümmel wrote:
>>
>> On 17.07.2012 19:32, Bill Hoffman wrote:
>>>
>>> On 7/17/2012 1:21 PM, Peter Kümmel wrote:
>>>>
>>>>
>>>> OK, maybe it is simpler to add a the functions to
>>>> cmNinjaTargetGenerator which
>>>>
>>>> forwards the call to the Local/Global classes.
>>>
>>> Lets just add the friend stuff for now so we can get the dashboard
>>> building again.
>>
>>
>> You could not add "friend class
>> cmNinjaTargetGenerator::MacOSXContentGeneratorType"
>> because cmNinjaTargetGenerator is forward declared, and including
>> cmNinjaTargetGenerator.h
>> doesn't help because it includes cmLocalNinjaGenerator.h again.
>>
>> Maybe making MacOSXContentGeneratorType global helps.
>> '
>
>
> There is also a warning here:
>
> C:/Users/hoffman/Work/My Builds/cmake/Source/cmNinjaTargetGenerator.cxx(60)
> : warning C4355: 'this' : used in base member initializer list
>
> Making the helper class global should fix the problem.  What about a letter
> envelope type of thing.  Move the whole MacOSXContentGeneratorType into the
> .cxx file.  Then forward declare the pointer to it in the
> cmNinjaTargetGenerator class.
>
> class cmMacOSXContentGeneratorType;
> class cmNinjaTargetGenerator
> {
> ...
> cmMacOSXContentGeneratorType* MacOSXContentGenerator;
>
>
> Then create it with new in the constructor.  This would get rid of the above
> warning as well.  I would like to clean this up before the nightly
> dashboards get going so we don't have a bunch of red tomorrow.
>

Bill,

You can find two patches in the following branch which should fix
these compilation issues. I have tested them with clang and gcc on Mac
OS X.

https://github.com/polrop/CMake/commits/ninja/fix_build
https://github.com/polrop/CMake/commit/5497caf3e0e14430a222e92f190d8d9ea4ee6e8a
https://github.com/polrop/CMake/commit/ae24daf591b12d8c23fa481f93a13270c9a0c00f

Note that this branch has been created from next so you better cherry
picked these two patches than merge them back to next.

Cheers,
Nico



More information about the cmake-developers mailing list