Am 28.11.2016 um 15:57 schrieb Brad King:
> On 11/25/2016 05:37 PM, Sebastian Holtermann wrote:
>> There are some issues with QtAutogen that still bother me and
>> that I would like to change.
> 
> Great!  We currently have no dedicated maintainer for it and I have
> little understanding of the tools and use cases associated with it
> myself.  It will be useful to have your help.

Okay.

>> 1) Most files get generated in
>> ${CMAKE_CURRENT_BINARY_DIR}/${TARGETNAME}_automoc.dir
>>
>> Is the ".dir" suffix neccessary? I think is should be removed.
> 
> That suffix is the convention used for all intermediate files
> (e.g. object files) associated with a particular target of any kind.
> The _automoc targets are simply following that convention, but there
> is no strong reason this has to be the case for the generated sources.

Okay, I'm going to remove it then in this place.
It is easier to read IMO.

>> 2) Moc files that are manually included by a
>> #include "moc_<basename>.cpp"
>> statement get generated in ${CMAKE_CURRENT_BINARY_DIR}
>>
>> A better solution would be to generate the moc_<basename>.cpp files in
>> ${CMAKE_CURRENT_BINARY_DIR}/${TARGETNAME}_automoc/include.
>> AUTOMOC then should automatically add that directory to the
>> INCLUDE_DIRECTORIES of the origin target.
> 
> Yes, I think that has been discussed before but no one ever implemented it.
> 
>> 3) The mocs compilation file currently gets generated as
>> ${CMAKE_CURRENT_BINARY_DIR}/${TARGETNAME}_automoc.cpp
>>
>> The file could be generated as
>> ${CMAKE_CURRENT_BINARY_DIR}/${TARGETNAME}_automoc/compilation.cpp
> 
> Okay.
> 
>> 4) AUTOMOC AUTOUIC and AUTORCC perform different independent tasks that
>> in the current implementation get processed serially inside a single
>> custom target named ${TARGETNAME}_automoc.
>>
>> I think each of the three could be handled in an own target.
> 
> In VS IDE and Xcode each target becomes another user-visible entity so
> we try to keep generated targets to a minimum.  IIRC in some cases we
> even try to use a PRE_BUILD step in the VS targets to avoid an extra
> target altogether.  The breakdown could be made generator-specific
> to improve behavior on Ninja and Makefile generators.  In the case that
> a common target is needed it could be renamed to `_autogen` instead.

For VS tries to use PRE_BUILD when possible for all other generators
a custom target is used. I took that from the source but I'm not
familiar with VS and can't test any changes.
It safer to leave this the way is is for now.

I'm going ahead then.

-Sebastian


-- 

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