On 03/12/2013 06:08 PM, Alexander Neundorf wrote: >> The original use case in this thread has a header-only target whose >> C++ linker language comes from the automoc source. This preserves >> that functionality too. > > I'm not sure this is "functionality", and not actually a bug, see below.
It worked in 2.8.10. I've seen a project use it. >> I've rebased Alex's AutomocFixWithoutQt topic on those changes >> for reference. > > thanks, I'll have a closer look at this tomorrow (or Thursday). 2.8.11-rc1 is coming up on Thursday if the dashboard is clean tonight. A whole day went by without discussion or progress on this so I took matters into my own hands since it is a regression. > My AutomocFixWithoutQt branch basically reverts the first commit, so automoc > is now again only one step, without the temporary vector of targets, without > needing additional checks. In this form the case that Qt was not present was > already handled correctly. > So with your fix and without Stephens first commit (79568f95) everything > would > have been fine already. ...except that the test case added by his patch then fails. The test case covers exactly the header-only case. I actually did this approach first. That's why I rebased and cleaned up your topic. Then I found the remaining test failure and switched to Stephen's approach. > So my first patch in the branch basically reverts 79568f95. Yes, I cleaned up the commit message to explain what is actually reverted and what is not. However, see the discussion of GetIncludeDirectories: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=79568f95 I think the two steps are needed to make that work. Stephen? > The second patch in my branch actually fixes a slightly different error (?) > case, which was not handled yet, and which is also not handled in the fix- > automoc-no-qt branch. > If you set CMAKE_AUTOMOC to ON, and Qt is available, and there are some plain > C targets, those turn into C++ too, since the automoc cpp file is added to > them. Nobody complained about this yet, but I think that's a bug. > Also I think turning a header-only C or C++ (?) library via automoc into a > "normal" C++ library, which you actually have to link against, is strange, if > not a bug. We'll need a policy to change this since it worked in 2.8.10. It's not a regression so I'm not going to rush that for 2.8.11. One can always set the AUTOMOC property explicitly to turn it off. -Brad -- 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
