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

Nicolas Desprès nicolas.despres at gmail.com
Tue Jul 17 13:11:58 EDT 2012


On Tue, Jul 17, 2012 at 7:01 PM, Peter Kümmel <syntheticpp at gmx.net> wrote:
> On 17.07.2012 15:39, Nicolas Desprès wrote:
>>
>> On Tue, Jul 17, 2012 at 3:29 PM, Bill Hoffman<bill.hoffman at kitware.com>
>> wrote:
>>>
>>> On 7/17/2012 8:10 AM, Peter Kümmel wrote:
>>>>
>>>>
>>>> On 17.07.2012 13:45, David Cole wrote:
>>>>>
>>>>>
>>>>>
>>>>> Peter, can you rebase this on current 'master', push this to our stage
>>>>> as a branch, and merge it to 'next'...?
>>>>>
>>>>
>>>> Done. Let's see what happens on CDash.
>>>>
>>>
>>> Looks ok, but is not building on Borland:
>>>
>>> http://open.cdash.org/viewBuildError.php?buildid=2447645
>>
>>
>> Looks like cmNinjaTargetGenerator::MacOSXContentGeneratorType should
>> be mark as friend of cmLocalNinjaGenerator and cmGlobalNinjaGenerator.
>> Apparently Borland does not forward friendness to innerclass.
>>
>> Cheers,
>> Nico
>
>
> Isn't it possible to avoid friend?
>
>     "'friend' is not your friend"
>

I don't like the friend keyword either but I try to follow the current
architecture of CMake. In cmLocalUnixMakefileGenerator you can see
that:

  friend class cmMakefileTargetGenerator;
  friend class cmMakefileExecutableTargetGenerator;
  friend class cmMakefileLibraryTargetGenerator;
  friend class cmMakefileUtilityTargetGenerator;
  friend class cmGlobalUnixMakefileGenerator3;

So it does in cmLocalNinjaGenerator.

I have an alternate approach to factor this code without using a
function object but it is much more complicated. See
https://github.com/polrop/CMake/commit/525ec73fa765b7ee55cd89799ba81410da0dab34

-- 
Nicolas Desprès



More information about the cmake-developers mailing list