Uploaded image for project: 'Open Development'
  1. Open Development
  2. OPEN-73

During a recompile unchanged files are recopied, wasting time during each recompile

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Component/s: autobuild, viewer build
    • Labels:
      None
    • Environment:
      Windows XP + Cmake 2.8.4 / Win 7 + Cmake 2.8.3
    • Acceptance Criteria:
      Unchanged files are not copied unnecessarily.

      Description

      Using either autobuild build or the IDE all the .dll etc files in the file copy projects are always copied. When I am recompiling over and over this wasted time starts to add up.

      Maybe there is a dependency set up in secondlife-bin for these files. Are they needed for linking or only during run time? If the later then the dependency for secondlife-bin under windows could be changed.

      The windows projects that do this are:
      stage_third_party_libs
      copy_win_scripts

      Discussion and ideas solicited.

      At first I thought this was true:
      Some investigation of \indra\cmake\CmakeCopyIfDifferent.cmake has revealed something interesting.
      If you change

      COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FROM} ${TO}
      

      to

      COMMAND ${CMAKE_COMMAND} -E copy ${FROM} ${TO}
      

      the files are copied once initially and then only as necessary (different/missing).

      But as it was pointed out, and as some testing has indicated, what the copy command is does not make a difference. I do have a touched cmake file where the file copies do not always occur but cannot reproduce this in another build tree.

      Now I think (after looking at the cmake source) that copy_if_different is reading the source and destination files and doing a block compare. I guess two reads are slightly more efficient than one read and one write, so leave that step unchanged.

      NickyP reports:

      I did a test with copy_if_different using copy like you had tried. I deleted a dll in sharedlibs. Ran and it copied that file only. Then, I touched lib/release/zlib1.dll and it copied that one file only.

        Attachments

          Activity

            People

            Assignee:
            boroondas.gupte Boroondas Gupte
            Reporter:
            jonathan.yap Jonathan Yap
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                PagerDuty