View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011884 | CMake | (No Category) | public | 2011-02-21 10:21 | 2011-09-05 11:37 | ||||
Reporter | Stephen Kelly | ||||||||
Assigned To | Clinton Stimpson | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | closed | Resolution | not fixable | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0011884: The target of qt4_add_dbus_interface should automatically depend on its generation. | ||||||||
Description | If you use qt4_generate_dbus_interface() to generate an xml file, you may have a qt4_add_dbus_interfaces() within the same project to consume the dbus interface. In that case you must ensure that the xml file is generated before they are consumed. You can do that by creating a custom target which encapsulates the dependencies. macro(my_generate_dbus_interface _header _customName ) qt4_generate_dbus_interface(${_header} ${_customName} ${ARGN} ) add_custom_target(xml_target_${_header} DEPENDS ${_customName}) add_dependencies(dbus_interfaces_xml xml_target_${_header} ) endmacro() Then use my_generate_dbus_interface instead of qt4_generate_dbus_interface. However, this should not be necessary. qt4_add_dbus_interfaces could depend on the xml file existing. Or maybe there's an even better solution. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | ![]() | ||||||||
Relationships | |
Relationships |
Notes | |
(0026092) Clinton Stimpson (developer) 2011-04-04 22:47 |
Do you have an example that demonstrates the problem? |
(0026094) Stephen Kelly (developer) 2011-04-05 09:35 |
See the attached. I have to build it twice because the xml file is not generated by the master build process before the slave build process attempts to use it. kde-devel@bishop:~/dev/src/playground/qml_dbus/orig/qml_dbus/build$ cmake .. -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/lib/icecc/bin/gcc -- Check for working C compiler: /usr/lib/icecc/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/lib/icecc/bin/c++ -- Check for working CXX compiler: /usr/lib/icecc/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Looking for Q_WS_X11 -- Looking for Q_WS_X11 - found -- Looking for Q_WS_WIN -- Looking for Q_WS_WIN - not found. -- Looking for Q_WS_QWS -- Looking for Q_WS_QWS - not found. -- Looking for Q_WS_MAC -- Looking for Q_WS_MAC - not found. -- Found Qt-Version 4.7.1 (using /home/kde-devel/dev/qt47/bin/qmake) -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found -- Looking for gethostbyname m-- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove a-- Looking for remove - found -- Looking for shmat k-- Looking for shmat - found -- Looking for IceConnectionNumber in ICE -- Looking for IceConnectionNumber in ICE - found -- Found X11: /usr/lib/libX11.so -- Looking for include files CMAKE_HAVE_PTHREAD_H e-- Looking for include files CMAKE_HAVE_PTHREAD_H - found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Looking for _POSIX_TIMERS -- Looking for _POSIX_TIMERS - found -- Configuring done -- Generating done -- Build files have been written to: /home/kde-devel/dev/src/playground/qml_dbus/orig/qml_dbus/build Qt( 4.7 ) KDE ( 4.6 ) kde-devel@bishop:~/dev/src/playground/qml_dbus/orig/qml_dbus/build$ make makeobj[0]: Entering directory `/home/kde-devel/dev/src/playground/qml_dbus/orig/qml_dbus/build' make[2]: *** No rule to make target `com.kdab.DynamicName.xml', needed by `slave/dynamicnameinterface.cpp'. Stop. make[1]: *** [slave/CMakeFiles/slave_app.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 7%] Generating dynamicname.moc [ 15%] Generating ../com.kdab.DynamicName.xml [ 23%] Generating dynamicnameadaptor.cpp, dynamicnameadaptor.h [ 30%] Generating dynamicnameadaptor.moc Scanning dependencies of target master_app [ 38%] [ 46%] [ 53%] Building CXX object master/CMakeFiles/master_app.dir/master.cpp.o Building CXX object master/CMakeFiles/master_app.dir/dynamicnameadaptor.cpp.o Building CXX object master/CMakeFiles/master_app.dir/dynamicname.cpp.o Linking CXX executable ../master_app [ 53%] Built target master_app make: *** [all] Error 2 makeobj[0]: Leaving directory `/home/kde-devel/dev/src/playground/qml_dbus/orig/qml_dbus/build' Qt( 4.7 ) KDE ( 4.6 ) kde-devel@bishop:~/dev/src/playground/qml_dbus/orig/qml_dbus/build$ make makeobj[0]: Entering directory `/home/kde-devel/dev/src/playground/qml_dbus/orig/qml_dbus/build' [ 7%] [ 15%] Generating dynamicnameinterface.cpp, dynamicnameinterface.h Generating dynamicnameproxy.moc [ 23%] [ 76%] Built target master_app Generating dynamicnameinterface.moc Scanning dependencies of target slave_app [ 84%] [ 92%] [100%] Building CXX object slave/CMakeFiles/slave_app.dir/dynamicnameproxy.cpp.o Building CXX object slave/CMakeFiles/slave_app.dir/slave.cpp.o Building CXX object slave/CMakeFiles/slave_app.dir/dynamicnameinterface.cpp.o Linking CXX executable ../slave_app [100%] Built target slave_app makeobj[0]: Leaving directory `/home/kde-devel/dev/src/playground/qml_dbus/orig/qml_dbus/build' Qt( 4.7 ) KDE ( 4.6 ) kde-devel@bishop:~/dev/src/playground/qml_dbus/orig/qml_dbus/build$ |
(0026096) Clinton Stimpson (developer) 2011-04-05 12:22 |
I've noticed that if you combine slave and master CMakeLists.txt files into one CMakeLists.txt file, the problem goes away. Looks like an issue related core cmake functionality. add_custom_target() or target level dependencies is something you can do, but not something FindQt4.cmake can do for you. I'll ask on the CMake list what should happen. |
(0026097) Clinton Stimpson (developer) 2011-04-05 13:18 |
Not fixable in the scope of the Qt4 macros. The user of those macros has to deal with it. See: http://www.cmake.org/pipermail/cmake/2011-April/043764.html [^] |
(0027343) David Cole (manager) 2011-09-05 11:37 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-02-21 10:21 | Stephen Kelly | New Issue | |
2011-02-22 17:22 | Brad King | Assigned To | => Clinton Stimpson |
2011-02-22 17:22 | Brad King | Status | new => assigned |
2011-04-04 22:47 | Clinton Stimpson | Note Added: 0026092 | |
2011-04-05 09:35 | Stephen Kelly | Note Added: 0026094 | |
2011-04-05 09:35 | Stephen Kelly | File Added: cmake_dbus.tar.gz | |
2011-04-05 12:22 | Clinton Stimpson | Note Added: 0026096 | |
2011-04-05 13:18 | Clinton Stimpson | Note Added: 0026097 | |
2011-04-05 13:18 | Clinton Stimpson | Status | assigned => resolved |
2011-04-05 13:18 | Clinton Stimpson | Resolution | open => not fixable |
2011-09-05 11:37 | David Cole | Status | resolved => closed |
2011-09-05 11:37 | David Cole | Note Added: 0027343 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |