[CMake] Transitive library dependencies with parallel builds
Do transitive dependencies reduce number of jobs that can be compiled in parallel? If I have two libraries A and B, with an executable C, whose dependencies are described by: add_library(A ${A_SRC}) add_library(B ${B_SRC}) target_link_libraries(B A) add_executable(C ${C_SRC}) target_link_libraries(C B) I understand that when *linking* C, the transitive dependency A will be added. However, if I build C in parallel make -j N, will CMake build libraries A and B simultaneously, or fully compile and link A before starting compilation of B? I.e. just because the link steps are serial dependencies, are the compilation steps? Would it be faster to do: add_library(A ${A_SRC}) add_library(B ${B_SRC}) add_executable(C ${C_SRC}) target_link_libraries(C B A) Thanks. -- 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] Parallel build with ctest 2.8.2
I'd just like to confirm that I've seen exactly the same bug since upgrading from 2.8.0 to 2.8.1. I've submitted a bug at: http://public.kitware.com/Bug/view.php?id=11026 On 21/07/10 16:06, Bill Hoffman wrote: On 7/21/2010 10:41 AM, Emmanuel Christophe wrote: Hi Dave, Thanks for the information. I was not aware of the new ctest script style: I got this from Luis when I set up the ITK nightly a while ago. That's also what seems to appear on: http://www.cmake.org/Wiki/CMake_Scripting_Of_CTest Do you have any pointer for the new-style ctest? Currently no. I would like to figure this out: On the DartConfiguration.tcl: MakeCommand: /usr/bin/make -i This is just a configured file at the end of the day. And the .in file has this: MakeCommand: @MAKECOMMAND@ So, if the cache has: MAKECOMMAND:STRING=/usr/bin/make -i -j8 Then it should work... Might be a double configure thing going on or something -Bill Thanks, Emmanuel On Wed, Jul 21, 2010 at 19:50, David Coledavid.c...@kitware.com wrote: I am guessing that this commit from Dec. 2009: 0b38bb4c535ae972d7f973e3e69945a6d0c14d75 to fix this bug: http://public.kitware.com/Bug/view.php?id=2336 is related to your problem... I would recommend updating your script to a new-style (since ctest 2.4 at least) script that uses the ctest_build() (and related) functions rather than executing -D Nightly as a CTEST_COMMAND. But... that's just a way to make it work with this newer ctest. There should still be some way to pass -j flags to an old-style script, or for use with a -D command line. If anybody figures out why this is happening, please reply to this thread with a recommended fix to the code. I am not surprised that this bug fix introduced a new issue like this. It was a tricky one to try to figure out a completely backwards compatible solution for. Thanks, David On Wed, Jul 21, 2010 at 3:28 AM, Emmanuel Christophe emmanuel.christo...@gmail.com wrote: On Tue, Jul 20, 2010 at 21:23, Bill Hoffmanbill.hoff...@kitware.com wrote: On 7/19/2010 11:10 PM, Emmanuel Christophe wrote: Hi all, I used to do parallel build for my nightly with ctest by putting MAKECOMMAND:STRING=/usr/bin/make -i -j8 in my .cmake script. http://www.cdash.org/CDash/buildSummary.php?buildid=669361 Build command: /usr/bin/make -i Start Time: 2010-07-19T11:51:09 EDT End Time: 2010-07-19T13:56:33 EDT So, it is not using make -j. You should look at the CMakeCache.txt and the DartConfiguration.tcl file and what values they have. On the CMakeCache.txt: //Command used to build entire project from the command line. MAKECOMMAND:STRING=/usr/bin/make -i -j8 On the DartConfiguration.tcl: MakeCommand: /usr/bin/make -i There is a mismatch here... I would have to see the cmake script you are using. The script is attached with the submissions: http://www.cdash.org/CDash/viewNotes.php?buildid=669361 Emmanuel ___ 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] CTest Subversion support and update handler
The more I look at the CVS logs for this, the more convinced I am that there's a major bug in the retrieval of log information for modified files. Apologies if my last post was a bit blunt. I'm just a bit disappointed at not having any response to my bug submissions or patches. I'm trying to do my bit for a incredibly useful piece of software. I can't be the only one using SVN and CTest (KDE??). So *please* could someone explain why log or status info is only retrieved for files whose update *isn't* an M, C or G Thanks again, Simon ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CTest Subversion support and update handler
Thanks for getting back to me. I'm working on a patch right now (with my best guess as to what was originally intended). Hopefully I'll have patch in the next day or so. Should I just post it here? Simon. OK, so I am going to be brutally honest here... The person that wrote the CVS/SVN update stuff for CTest is not really working on CMake anymore. I suspect you have found a bug that needs fixing. We do use svn/CTest on many projects at Kitware. However, no one has complained about this bug yet. It is hard to see. I have not had the time to figure out how to answer your questions. I will get to it at some point, hopefully soon. That said, there are plans in place to add support for git and other version control systems, and during that process it is likely this update part of ctest will be re-factored. -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CTest Subversion support and update handler
Please see submitted report and patch at http://www.cmake.org/Bug/view.php?id=8168 Bill Hoffman wrote: Number Cruncher wrote: Thanks for getting back to me. I'm working on a patch right now (with my best guess as to what was originally intended). Hopefully I'll have patch in the next day or so. Should I just post it here? Better to create a bug entry and post it there. Thanks! -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] CTest Subversion support and update handler
I'm trying to patch CTest (CMake 2.6.2) so that it can handle spaces in usernames, but am having real difficulty understand the cmCTestUpdateHandler::ProcessHandler() source and believe there may be fundamental bugs in the code. The lack of *any* comments doesn't help and makes me worry about the general quality of CTest but, criticism aside, could someone please advise me on the following lines (from the 2.6.2 .tar.gz in Source/CTest/cmCTestUpdateHandler.cxx): 707: Shouldn't a file be modifiedOrConflict if mod equals any of M/C/G - the opposite of what's coded? 726: Why is svn status being used when updating to and older version? Why not just use svn log again. This is the area I was trying to patch: by using svn status --xml to parse user names with spaces in (don't ask..) 758: res is only set correctly after the (modifiedOrConflict) branch runs its logcommand. Currently this is buggy 'cos it's outside the logcommand branch and could use a stale value. Thanks for any help. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake