On 2016-10-22 03:35+0100 Sascha Cunz wrote:

But automoc must know where to look for. It can only do that if
something tells it where to look - If your header files are in the
same directory as the source files, they’re getting added and scanned
automatically.
If, like in your example, the files are in different directories,
you have to add them to add_executable / add_library in order to let
automoc know that it shall scan them.

That is a good summary of what I have discovered through
experimentation.  However, I view these results for the separate
header file directory as an unexpected constraint of automoc at best.
Compilers know exactly where the header files are through
include_directories or the equivalent target PROPERTY so why can't
automoc find those same header files using similar logic?

Of course, I am in the odd position (as I explained before) of not
being able to help out with implementing such logic so if it turns
out nobody wants to clean up this issue at the moment, I will put
it on the bugtracker for future reference.

[...]

However, I see that the take away from the thread should probably be
that the wording in the documentation could be improved. To be fair,
it is in general very hard for someone who knows a tool and it’s
complete history to write documentation that someone who doesn’t have
that prior knowledge is able to understand. So, improving things here
usually relies on input like yours to figure out what actually has to
be improved.

I agree.  I have already suggested some possible changes to the
documentation on the initial thread on the CMake mailing list and this
additional thread here on the CMake developer list.  But if nobody is
inspired to take immediate action on fixing the problem summarized
above (which would largely make the current documentation correct), I will write
up these documentation issues for the current automoc behaviour for
the bugtracker as well.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________
--

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