On 17.07.2012 19:11, Nicolas Desprès wrote:

I don't like the friend keyword either but I try to follow the current
architecture of CMake.

Yes, I know.

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


OK, maybe it is simpler to add a the functions to cmNinjaTargetGenerator which
forwards the call to the Local/Global classes.

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