View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009955CMakeModulespublic2009-11-23 09:162016-06-10 14:31
ReporterPau Garcia i Quiles 
Assigned ToClinton Stimpson 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionFixed in Version 
Summary0009955: qt4_automoc fails if .h and .cpp in different directories
DescriptionIn the FindQt4.cmake module, if you use qt4_automoc instead of qt4_wrapp_cpp, and the .h and the .cpp files are in different directories, qt4_automoc fails because it looks for the .h file in the same directory the .cpp file is.
Additional InformationAlso happens in 2.6.4

See the attached file for an example:

- The 'samedir' directory contains a KDevelop4-generated CMake project where the .h and the .cpp are in the same directory. In this case, qt4_automoc works fine.

- The 'differentdir' directory contains a modified version of the 'samedir' directory: now the .h and the .cpp are in different directories. In this case, qt4_automoc works fails.
TagsNo tags attached.
Attached Filesbz2 file icon automoctest.tar.bz2 [^] (1,140 bytes) 2009-11-23 09:16
diff file icon automoc_using_includes.diff [^] (2,616 bytes) 2014-06-12 07:40 [Show Content]
diff file icon automoc_using_includes_with_tests.diff [^] (5,581 bytes) 2014-07-31 09:26 [Show Content]
diff file icon automoc_using_includes_with_qtautogen_tests.diff [^] (4,769 bytes) 2014-08-07 04:37 [Show Content]

 Relationships

  Notes
(0018744)
Alex Neundorf (developer)
2009-12-09 14:42

I don't think I'll fix this.
This is hard to do with pure cmake script.
The good solution for this is to take automoc4 from kdesvn/automoc/, port it from Qt to plain STL and integrate this into cmake.

Alex
(0018989)
Alex Neundorf (developer)
2009-12-23 12:56

Clinton, do you want to work on this ?
I'd say we should try to integrate automoc4 from KDE (http://websvn.kde.org/trunk/kdesupport/automoc/ [^] , http://techbase.kde.org/Development/Tools/Automoc4 [^] ) into cmake instead. Then we can do much more.

Alex
(0036165)
Clinton Stimpson (developer)
2014-06-12 08:42

Thanks! Can you also make a test for this?
(0036545)
Clinton Stimpson (developer)
2014-08-04 11:07

Committed. Thanks.
http://cmake.org/gitweb?p=cmake.git;a=commit;h=6e576ba [^]
(0036546)
Clinton Stimpson (developer)
2014-08-04 11:10

Actually, this is the correct one, which fixes the attribution.
http://cmake.org/gitweb?p=cmake.git;a=commit;h=cf4a7eb [^]
(0036552)
Clinton Stimpson (developer)
2014-08-05 09:48

Reopening because the testing still needs work, and the commits were reverted.

Feedback from Stephen Kelly:
Your topic changes the Qt4And5Automoc test in an undesirable way. The
point of the test is to run when both are available.

I recommend you create a new unit test for your feature and consider this:

cmake{master}$ git grep QT_TEST_VERSION Tests/
Tests/CMakeLists.txt:
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=5
Tests/CMakeLists.txt:
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=5
Tests/CMakeLists.txt:
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=4
Tests/CMakeLists.txt:
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=4
Tests/QtAutoUicInterface/CMakeLists.txt:if (QT_TEST_VERSION STREQUAL 4)
Tests/QtAutoUicInterface/CMakeLists.txt: if (NOT QT_TEST_VERSION
STREQUAL 5)
Tests/QtAutogen/CMakeLists.txt:if (QT_TEST_VERSION STREQUAL 4)
Tests/QtAutogen/CMakeLists.txt: if (NOT QT_TEST_VERSION STREQUAL 5)



and after I modified the test to require both Qt4 and Qt5 he says:
Wouldn't it make more sense to extend the QtAutomoc test instead? That
is for testing QtAutomoc generally while Qt4And5Automoc is specifically
about testing in the presence of both Qt 4 and 5. Your patch dilutes
that test to also do more-general testing. Wouldn't it make more sense
to extend the QtAutomoc test instead?

Thanks,
Steve.
(0036554)
Clinton Stimpson (developer)
2014-08-05 10:57

Actually, it makes sense to extend the "QtAutogen" test, not "QtAutomoc" which doesn't exist, or the "Qt4AndQt5Automoc" test.
(0036567)
Lode Leroy (reporter)
2014-08-07 04:38

added patch with updated tests
(0041626)
Kitware Robot (administrator)
2016-06-10 14:27

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2009-11-23 09:16 Pau Garcia i Quiles New Issue
2009-11-23 09:16 Pau Garcia i Quiles File Added: automoctest.tar.bz2
2009-11-23 10:59 Bill Hoffman Status new => assigned
2009-11-23 10:59 Bill Hoffman Assigned To => Clinton Stimpson
2009-12-08 09:31 Bill Hoffman Assigned To Clinton Stimpson => Alex Neundorf
2009-12-09 14:42 Alex Neundorf Note Added: 0018744
2009-12-23 12:56 Alex Neundorf Note Added: 0018989
2009-12-23 12:56 Alex Neundorf Assigned To Alex Neundorf => Clinton Stimpson
2012-08-13 23:25 Clinton Stimpson Status assigned => backlog
2014-06-12 07:40 Lode Leroy File Added: automoc_using_includes.diff
2014-06-12 08:42 Clinton Stimpson Note Added: 0036165
2014-07-31 09:26 Lode Leroy File Added: automoc_using_includes_with_tests.diff
2014-08-04 11:07 Clinton Stimpson Note Added: 0036545
2014-08-04 11:07 Clinton Stimpson Status backlog => resolved
2014-08-04 11:07 Clinton Stimpson Resolution open => fixed
2014-08-04 11:09 Clinton Stimpson Status resolved => feedback
2014-08-04 11:09 Clinton Stimpson Resolution fixed => reopened
2014-08-04 11:10 Clinton Stimpson Note Added: 0036546
2014-08-04 11:10 Clinton Stimpson Status feedback => resolved
2014-08-04 11:10 Clinton Stimpson Resolution reopened => fixed
2014-08-05 09:48 Clinton Stimpson Note Added: 0036552
2014-08-05 09:48 Clinton Stimpson Status resolved => feedback
2014-08-05 09:48 Clinton Stimpson Resolution fixed => reopened
2014-08-05 10:57 Clinton Stimpson Note Added: 0036554
2014-08-07 04:37 Lode Leroy File Added: automoc_using_includes_with_qtautogen_tests.diff
2014-08-07 04:38 Lode Leroy Note Added: 0036567
2016-06-10 14:27 Kitware Robot Note Added: 0041626
2016-06-10 14:27 Kitware Robot Status feedback => resolved
2016-06-10 14:27 Kitware Robot Resolution reopened => moved
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team