Re: [CMake] Naive (stupid?) question
Alexander, thanks for your explanation. I think we are introducing fake dependencies in the way we include directories. We will have to look into this. I was not questioning cmake, for me it is clear that the problem is on our side. I also think we are abusing the configure_file comamnd using it to copy files instead of introducing some real dependencies. Some cleanup is needed Best, Federico Carminati CERN-PH 1211 Geneva 23 Switzerland Tel: +41 22 76 74959 Fax: +41 22 76 68505 Mobile: +41 76 487 4843 On 17 Feb 2011, at 18:12, Alexander Neundorf wrote: > On Thursday 17 February 2011, Dominik Szczerba wrote: >> I am also sometimes surprised by the radius of needed re-compilation >> in my complex project... I think CMake tries to be on the safe side >> and just regenerates everything that might have been affected. > > From the experiences in KDE and at work, I haven't seen anything being > unnecessarily being recompiled for a long time (I think the last time I saw > something unnecessary being built again was in summer 2006). > > When a include dir changes, everything below it will be rebuilt. The same for > anything else which changes the compile flags. > If only your link command changes, the stuff will only be linked again. > > CMake takes great care to ensure only the necessary stuff will be rebuilt: it > uses copy-if-changed semantics for creating the Makefiles, the Makefiles are > split in parts in such a way that as mentioned above, if only linking has > changed, then there are separate files which contain only the linking > commands, etc. > > Most probably you really have the dependencies which cause a rebuild. > > Or maybe something is wrong with your (networked ?) filesystem and the > timestamps. I have seen that, unncessary recompiles on a network filesystem, > which was most probably caused by filesystem issues. > > 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Naive (stupid?) question
On Thursday 17 February 2011, Dominik Szczerba wrote: > I am also sometimes surprised by the radius of needed re-compilation > in my complex project... I think CMake tries to be on the safe side > and just regenerates everything that might have been affected. >From the experiences in KDE and at work, I haven't seen anything being unnecessarily being recompiled for a long time (I think the last time I saw something unnecessary being built again was in summer 2006). When a include dir changes, everything below it will be rebuilt. The same for anything else which changes the compile flags. If only your link command changes, the stuff will only be linked again. CMake takes great care to ensure only the necessary stuff will be rebuilt: it uses copy-if-changed semantics for creating the Makefiles, the Makefiles are split in parts in such a way that as mentioned above, if only linking has changed, then there are separate files which contain only the linking commands, etc. Most probably you really have the dependencies which cause a rebuild. Or maybe something is wrong with your (networked ?) filesystem and the timestamps. I have seen that, unncessary recompiles on a network filesystem, which was most probably caused by filesystem issues. 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Naive (stupid?) question
On Thursday 17 February 2011, Carminati Federico wrote: > Thanks John, > Indeed there is one and this is certainly part of the problem. We also > found out that using "configure_file" to copy files can generate large > rebuild of the entire makefile structure. We will have to look into this. configure_file() updates the written file only if the content actually changed. So if the content of the configured file did not change, no recompile will happen due to it. If you have something like a timestamp in it, it would change everytime. 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Naive (stupid?) question
configure_file() only copies changed files, so that *must* trigger a rebuild of all dependent files. Michael On 17.02.2011, at 14:37, Carminati Federico wrote: > Thanks John, > Indeed there is one and this is certainly part of the problem. We also found > out that using "configure_file" to copy files can generate large rebuild of > the entire makefile structure. We will have to look into this. Best regards, > > Federico Carminati > CERN-PH > 1211 Geneva 23 > Switzerland > Tel: +41 22 76 74959 > Fax: +41 22 76 68505 > Mobile: +41 76 487 4843 > > > > On 17 Feb 2011, at 14:05, John Drescher wrote: > >>> apologies for the stupid question. I have a large project and at times a >>> change triggers unexpected consequences, i.e. very large recompilations, >>> rebuild of the cmake makefiles and so on. Is there a way in cmake to >>> understand why things happens? I mean which chain of dependencies causes a >>> given action to be taken? It would be for me very interesting to understand >>> something more about the dependencies in my project, to be able to reduce >>> them. Thanks and best regards, >>> >> Are you generating header files in CMake? If so these change on every >> invocation of CMake? And is a lot of your project dependent on these >> header files? >> >> John > > ___ > 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://www.cmake.org/mailman/listinfo/cmake ___ 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Naive (stupid?) question
Thanks John, Indeed there is one and this is certainly part of the problem. We also found out that using "configure_file" to copy files can generate large rebuild of the entire makefile structure. We will have to look into this. Best regards, Federico Carminati CERN-PH 1211 Geneva 23 Switzerland Tel: +41 22 76 74959 Fax: +41 22 76 68505 Mobile: +41 76 487 4843 On 17 Feb 2011, at 14:05, John Drescher wrote: >>apologies for the stupid question. I have a large project and at times a >> change triggers unexpected consequences, i.e. very large recompilations, >> rebuild of the cmake makefiles and so on. Is there a way in cmake to >> understand why things happens? I mean which chain of dependencies causes a >> given action to be taken? It would be for me very interesting to understand >> something more about the dependencies in my project, to be able to reduce >> them. Thanks and best regards, >> > Are you generating header files in CMake? If so these change on every > invocation of CMake? And is a lot of your project dependent on these > header files? > > John ___ 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Naive (stupid?) question
> apologies for the stupid question. I have a large project and at times a > change triggers unexpected consequences, i.e. very large recompilations, > rebuild of the cmake makefiles and so on. Is there a way in cmake to > understand why things happens? I mean which chain of dependencies causes a > given action to be taken? It would be for me very interesting to understand > something more about the dependencies in my project, to be able to reduce > them. Thanks and best regards, > Are you generating header files in CMake? If so these change on every invocation of CMake? And is a lot of your project dependent on these header files? John ___ 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Naive (stupid?) question
I am also sometimes surprised by the radius of needed re-compilation in my complex project... I think CMake tries to be on the safe side and just regenerates everything that might have been affected. One such example will be recompilation of large project parts if you modified some variables in the root CMakeLists.txt. On the other hand, you may have twisted dependencies in your project that you may want to clean up and separate. Dominik On Tue, Feb 15, 2011 at 10:05 PM, Carminati Federico wrote: > Hello, > apologies for the stupid question. I have a large project and at times a > change triggers unexpected consequences, i.e. very large recompilations, > rebuild of the cmake makefiles and so on. Is there a way in cmake to > understand why things happens? I mean which chain of dependencies causes a > given action to be taken? It would be for me very interesting to understand > something more about the dependencies in my project, to be able to reduce > them. Thanks and best regards, > > Federico Carminati > CERN-PH > 1211 Geneva 23 > Switzerland > Tel: +41 22 76 74959 > Fax: +41 22 76 68505 > Mobile: +41 76 487 4843 > > > > ___ > 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://www.cmake.org/mailman/listinfo/cmake > > ___ 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://www.cmake.org/mailman/listinfo/cmake
[CMake] Naive (stupid?) question
Hello, apologies for the stupid question. I have a large project and at times a change triggers unexpected consequences, i.e. very large recompilations, rebuild of the cmake makefiles and so on. Is there a way in cmake to understand why things happens? I mean which chain of dependencies causes a given action to be taken? It would be for me very interesting to understand something more about the dependencies in my project, to be able to reduce them. Thanks and best regards, Federico Carminati CERN-PH 1211 Geneva 23 Switzerland Tel: +41 22 76 74959 Fax: +41 22 76 68505 Mobile: +41 76 487 4843 ___ 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://www.cmake.org/mailman/listinfo/cmake