Re: [cmake-developers] Use OBJECT_DEPENDS in qt4_generate_moc() ?
On Friday 27 July 2012, David Cole wrote: On Fri, Jul 27, 2012 at 4:27 PM, Alexander Neundorf neund...@kde.org wrote: On Thursday 05 July 2012, David Cole wrote: On Thu, Jul 5, 2012 at 12:29 PM, Clinton Stimpson clin...@elemtech.com wrote: On Thursday, July 05, 2012 06:20:56 PM Alexander Neundorf wrote: On Thursday, 5. July 2012 17:37:21 Clinton Stimpson wrote: On Friday, June 15, 2012 09:56:51 PM Alexander Neundorf wrote: Hi, attached is a small patch which sets the OBJECT_DEPENDS property of a moced file to the generated moc file. This has the effect that before the cpp file is built, moc has been run on it. We have that in KDE's version of qt4_generate_moc() this way since 2006 and it works for us. In cmake's version, it was removed January 11th 2008, the removed call to MACRO_ADD_FILE_DEPENDENCIES(): http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=510f578f8b5385 8fb b541c 4e7 e4731de9bfbd483 Now since we are trying to get rid of our custom stuff in KDE, we hit that issue when trying to build parts of KDE with FindQt4.cmake from cmake. Do you remember why this line was removed ? What do you think about adding it again, as the attached patch does ? Alex It was probably removed because I thought add_custom_command() already added the needed dependency information. It should already have this: mocable.h - moc_mocable.cpp - moc_mocable.o This works if the generated moc file is listed as source file for a target. In several places we did not do this, and relied instead on the OBJECT_DEPENDS. Ahh, this was in places where the moc file is generated from a cpp file, which includes the moc file. In those cases the OBJECT_DEPENDS makes it work. We fixed this in the meantime by adding the generated moc file to the source list (which is not too bad, since the developer explicitely names the moc file, so it is ok). So, I would like to have that dependency, but I'm unsure whether it might have any unwanted side effects. Ah, so for the case mocable.h - mocable.moc - mocable.cpp (includes mocable.moc) the mocable.moc is not listed in the sources of the target. I can't think of any possible unwanted side effects. I agree that we need to have this patch. -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.com -- 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 If somebody pushes this to 'next' today or tomorrow, I'll make sure we can get it into 2.8.9-rc2. Too late now for 2.8.9 ? Alex Unless you tell me it's absolutely critical, and the fix is 99.% safe, then, yes, it's too late. But 2.8.10 is right around the corner if you adopt the right viewpoint. :-) Ok, this can wait until 2.8.10. Can the branch EclipseAddSupportForJuno still make it into 2.8.9 ? It improves the Eclipse generator by adding support for Eclipse Juno (the most recent one) and improves behaviour on Mac, and it should be completely safe. Alex -- 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
Re: [cmake-developers] Use OBJECT_DEPENDS in qt4_generate_moc() ?
On Thursday 05 July 2012, David Cole wrote: On Thu, Jul 5, 2012 at 12:29 PM, Clinton Stimpson clin...@elemtech.com wrote: On Thursday, July 05, 2012 06:20:56 PM Alexander Neundorf wrote: On Thursday, 5. July 2012 17:37:21 Clinton Stimpson wrote: On Friday, June 15, 2012 09:56:51 PM Alexander Neundorf wrote: Hi, attached is a small patch which sets the OBJECT_DEPENDS property of a moced file to the generated moc file. This has the effect that before the cpp file is built, moc has been run on it. We have that in KDE's version of qt4_generate_moc() this way since 2006 and it works for us. In cmake's version, it was removed January 11th 2008, the removed call to MACRO_ADD_FILE_DEPENDENCIES(): http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=510f578f8b53858fb b541c 4e7 e4731de9bfbd483 Now since we are trying to get rid of our custom stuff in KDE, we hit that issue when trying to build parts of KDE with FindQt4.cmake from cmake. Do you remember why this line was removed ? What do you think about adding it again, as the attached patch does ? Alex It was probably removed because I thought add_custom_command() already added the needed dependency information. It should already have this: mocable.h - moc_mocable.cpp - moc_mocable.o This works if the generated moc file is listed as source file for a target. In several places we did not do this, and relied instead on the OBJECT_DEPENDS. Ahh, this was in places where the moc file is generated from a cpp file, which includes the moc file. In those cases the OBJECT_DEPENDS makes it work. We fixed this in the meantime by adding the generated moc file to the source list (which is not too bad, since the developer explicitely names the moc file, so it is ok). So, I would like to have that dependency, but I'm unsure whether it might have any unwanted side effects. Ah, so for the case mocable.h - mocable.moc - mocable.cpp (includes mocable.moc) the mocable.moc is not listed in the sources of the target. I can't think of any possible unwanted side effects. I agree that we need to have this patch. -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.com -- 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 If somebody pushes this to 'next' today or tomorrow, I'll make sure we can get it into 2.8.9-rc2. Too late now for 2.8.9 ? Alex -- 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
Re: [cmake-developers] Use OBJECT_DEPENDS in qt4_generate_moc() ?
On Fri, Jul 27, 2012 at 4:27 PM, Alexander Neundorf neund...@kde.org wrote: On Thursday 05 July 2012, David Cole wrote: On Thu, Jul 5, 2012 at 12:29 PM, Clinton Stimpson clin...@elemtech.com wrote: On Thursday, July 05, 2012 06:20:56 PM Alexander Neundorf wrote: On Thursday, 5. July 2012 17:37:21 Clinton Stimpson wrote: On Friday, June 15, 2012 09:56:51 PM Alexander Neundorf wrote: Hi, attached is a small patch which sets the OBJECT_DEPENDS property of a moced file to the generated moc file. This has the effect that before the cpp file is built, moc has been run on it. We have that in KDE's version of qt4_generate_moc() this way since 2006 and it works for us. In cmake's version, it was removed January 11th 2008, the removed call to MACRO_ADD_FILE_DEPENDENCIES(): http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=510f578f8b53858fb b541c 4e7 e4731de9bfbd483 Now since we are trying to get rid of our custom stuff in KDE, we hit that issue when trying to build parts of KDE with FindQt4.cmake from cmake. Do you remember why this line was removed ? What do you think about adding it again, as the attached patch does ? Alex It was probably removed because I thought add_custom_command() already added the needed dependency information. It should already have this: mocable.h - moc_mocable.cpp - moc_mocable.o This works if the generated moc file is listed as source file for a target. In several places we did not do this, and relied instead on the OBJECT_DEPENDS. Ahh, this was in places where the moc file is generated from a cpp file, which includes the moc file. In those cases the OBJECT_DEPENDS makes it work. We fixed this in the meantime by adding the generated moc file to the source list (which is not too bad, since the developer explicitely names the moc file, so it is ok). So, I would like to have that dependency, but I'm unsure whether it might have any unwanted side effects. Ah, so for the case mocable.h - mocable.moc - mocable.cpp (includes mocable.moc) the mocable.moc is not listed in the sources of the target. I can't think of any possible unwanted side effects. I agree that we need to have this patch. -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.com -- 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 If somebody pushes this to 'next' today or tomorrow, I'll make sure we can get it into 2.8.9-rc2. Too late now for 2.8.9 ? Alex Unless you tell me it's absolutely critical, and the fix is 99.% safe, then, yes, it's too late. But 2.8.10 is right around the corner if you adopt the right viewpoint. :-) -- 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
Re: [cmake-developers] Use OBJECT_DEPENDS in qt4_generate_moc() ?
On Friday, June 15, 2012 09:56:51 PM Alexander Neundorf wrote: Hi, attached is a small patch which sets the OBJECT_DEPENDS property of a moced file to the generated moc file. This has the effect that before the cpp file is built, moc has been run on it. We have that in KDE's version of qt4_generate_moc() this way since 2006 and it works for us. In cmake's version, it was removed January 11th 2008, the removed call to MACRO_ADD_FILE_DEPENDENCIES(): http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=510f578f8b53858fbb541c4e7 e4731de9bfbd483 Now since we are trying to get rid of our custom stuff in KDE, we hit that issue when trying to build parts of KDE with FindQt4.cmake from cmake. Do you remember why this line was removed ? What do you think about adding it again, as the attached patch does ? Alex It was probably removed because I thought add_custom_command() already added the needed dependency information. It should already have this: mocable.h - moc_mocable.cpp - moc_mocable.o or mocable.h - mocable.moc - mocable.cpp (includes mocable.moc) Why do we need the extra dependency like this? mocable.h - mocable.cpp -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.com -- 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
Re: [cmake-developers] Use OBJECT_DEPENDS in qt4_generate_moc() ?
On Thursday, 5. July 2012 17:37:21 Clinton Stimpson wrote: On Friday, June 15, 2012 09:56:51 PM Alexander Neundorf wrote: Hi, attached is a small patch which sets the OBJECT_DEPENDS property of a moced file to the generated moc file. This has the effect that before the cpp file is built, moc has been run on it. We have that in KDE's version of qt4_generate_moc() this way since 2006 and it works for us. In cmake's version, it was removed January 11th 2008, the removed call to MACRO_ADD_FILE_DEPENDENCIES(): http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=510f578f8b53858fbb541c 4e7 e4731de9bfbd483 Now since we are trying to get rid of our custom stuff in KDE, we hit that issue when trying to build parts of KDE with FindQt4.cmake from cmake. Do you remember why this line was removed ? What do you think about adding it again, as the attached patch does ? Alex It was probably removed because I thought add_custom_command() already added the needed dependency information. It should already have this: mocable.h - moc_mocable.cpp - moc_mocable.o This works if the generated moc file is listed as source file for a target. In several places we did not do this, and relied instead on the OBJECT_DEPENDS. Ahh, this was in places where the moc file is generated from a cpp file, which includes the moc file. In those cases the OBJECT_DEPENDS makes it work. We fixed this in the meantime by adding the generated moc file to the source list (which is not too bad, since the developer explicitely names the moc file, so it is ok). So, I would like to have that dependency, but I'm unsure whether it might have any unwanted side effects. Alex P.S. I'll be offline for the following two weeks -- 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
Re: [cmake-developers] Use OBJECT_DEPENDS in qt4_generate_moc() ?
On Thursday, July 05, 2012 06:20:56 PM Alexander Neundorf wrote: On Thursday, 5. July 2012 17:37:21 Clinton Stimpson wrote: On Friday, June 15, 2012 09:56:51 PM Alexander Neundorf wrote: Hi, attached is a small patch which sets the OBJECT_DEPENDS property of a moced file to the generated moc file. This has the effect that before the cpp file is built, moc has been run on it. We have that in KDE's version of qt4_generate_moc() this way since 2006 and it works for us. In cmake's version, it was removed January 11th 2008, the removed call to MACRO_ADD_FILE_DEPENDENCIES(): http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=510f578f8b53858fb b541c 4e7 e4731de9bfbd483 Now since we are trying to get rid of our custom stuff in KDE, we hit that issue when trying to build parts of KDE with FindQt4.cmake from cmake. Do you remember why this line was removed ? What do you think about adding it again, as the attached patch does ? Alex It was probably removed because I thought add_custom_command() already added the needed dependency information. It should already have this: mocable.h - moc_mocable.cpp - moc_mocable.o This works if the generated moc file is listed as source file for a target. In several places we did not do this, and relied instead on the OBJECT_DEPENDS. Ahh, this was in places where the moc file is generated from a cpp file, which includes the moc file. In those cases the OBJECT_DEPENDS makes it work. We fixed this in the meantime by adding the generated moc file to the source list (which is not too bad, since the developer explicitely names the moc file, so it is ok). So, I would like to have that dependency, but I'm unsure whether it might have any unwanted side effects. Ah, so for the case mocable.h - mocable.moc - mocable.cpp (includes mocable.moc) the mocable.moc is not listed in the sources of the target. I can't think of any possible unwanted side effects. I agree that we need to have this patch. -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.com -- 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
Re: [cmake-developers] Use OBJECT_DEPENDS in qt4_generate_moc() ?
On Thu, Jul 5, 2012 at 12:29 PM, Clinton Stimpson clin...@elemtech.com wrote: On Thursday, July 05, 2012 06:20:56 PM Alexander Neundorf wrote: On Thursday, 5. July 2012 17:37:21 Clinton Stimpson wrote: On Friday, June 15, 2012 09:56:51 PM Alexander Neundorf wrote: Hi, attached is a small patch which sets the OBJECT_DEPENDS property of a moced file to the generated moc file. This has the effect that before the cpp file is built, moc has been run on it. We have that in KDE's version of qt4_generate_moc() this way since 2006 and it works for us. In cmake's version, it was removed January 11th 2008, the removed call to MACRO_ADD_FILE_DEPENDENCIES(): http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=510f578f8b53858fb b541c 4e7 e4731de9bfbd483 Now since we are trying to get rid of our custom stuff in KDE, we hit that issue when trying to build parts of KDE with FindQt4.cmake from cmake. Do you remember why this line was removed ? What do you think about adding it again, as the attached patch does ? Alex It was probably removed because I thought add_custom_command() already added the needed dependency information. It should already have this: mocable.h - moc_mocable.cpp - moc_mocable.o This works if the generated moc file is listed as source file for a target. In several places we did not do this, and relied instead on the OBJECT_DEPENDS. Ahh, this was in places where the moc file is generated from a cpp file, which includes the moc file. In those cases the OBJECT_DEPENDS makes it work. We fixed this in the meantime by adding the generated moc file to the source list (which is not too bad, since the developer explicitely names the moc file, so it is ok). So, I would like to have that dependency, but I'm unsure whether it might have any unwanted side effects. Ah, so for the case mocable.h - mocable.moc - mocable.cpp (includes mocable.moc) the mocable.moc is not listed in the sources of the target. I can't think of any possible unwanted side effects. I agree that we need to have this patch. -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.com -- 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 If somebody pushes this to 'next' today or tomorrow, I'll make sure we can get it into 2.8.9-rc2. -- 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
[cmake-developers] Use OBJECT_DEPENDS in qt4_generate_moc() ?
Hi, attached is a small patch which sets the OBJECT_DEPENDS property of a moced file to the generated moc file. This has the effect that before the cpp file is built, moc has been run on it. We have that in KDE's version of qt4_generate_moc() this way since 2006 and it works for us. In cmake's version, it was removed January 11th 2008, the removed call to MACRO_ADD_FILE_DEPENDENCIES(): http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=510f578f8b53858fbb541c4e7e4731de9bfbd483 Now since we are trying to get rid of our custom stuff in KDE, we hit that issue when trying to build parts of KDE with FindQt4.cmake from cmake. Do you remember why this line was removed ? What do you think about adding it again, as the attached patch does ? Alex --- Qt4Macros.cmake.orig 2012-06-15 21:39:23.0 +0200 +++ Qt4Macros.cmake 2012-06-15 21:36:00.0 +0200 @@ -133,6 +133,7 @@ MACRO (QT4_GENERATE_MOC infile outfile ) ENDIF(NOT IS_ABSOLUTE ${outfile}) QT4_CREATE_MOC_COMMAND(${abs_infile} ${_outfile} ${moc_flags} ) SET_SOURCE_FILES_PROPERTIES(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file + SET_PROPERTY(SOURCE ${abs_infile} APPEND PROPERTY OBJECT_DEPENDS ${_outfile} ) ENDMACRO (QT4_GENERATE_MOC) -- 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