Wireshark-commits: [Wireshark-commits] master ffb5b3d: cmake: add dependency information for copy_d

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 24 Nov 2015 06:14:05 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=ffb5b3d727e2f5bea0739512ed2d5d8a236c9ed9
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

ffb5b3d by Peter Wu (peter@xxxxxxxxxxxxx):

    cmake: add dependency information for copy_data_files
    
    Original problem: run/radius/ (and other files) would continuously be
    copied over because the "copy_directory" command is always invoked,
    resulting in a newer timestamp (observable via rsync output).
    
    Fix 1: convert from "copy_directory" to copying individual files
    (matched via a glob pattern).
    
    Fix 2: add DEPENDS information to the commands, ensuring that the
    copy commands are only invoked when the file is actually newer.
    (copy_if_different does not respect timestamp, so use plain copy.)
    
    Other visible changes:
     - radius/Custom.make (automake thingey) is not copied anymore because
       an explicit list is used with glob patterns.
     - Removed comment about "default.tt" (gone since
       v1.99.0-rc1-1684-g07b003a, Makefile.nmake is still untouched though).
    
    Due to fix 1, the number of processes increase by about 300. Due to fix
    2 however, less processes are executed for repetitive runs. This is
    visible in the following build time comparison:
    
        patch/generator cmake  build1  build2   clean
        before/make     24.86  152.73    3.46    1.04
        after/make      24.78  153.08    3.40    1.03
        before/ninja    22.99  141.68    0.64    0.24
        after/ninja     22.89  141.66    0.10    0.25
    
    cmake is "cmake -DCMAKE_BUILD_TYPE=None -GNinja" (-G"Unix Makefiles");
    build1 is invocation of "make -j10"/"ninja" on v2.1.0rc0-668-g94b9907;
    build2 is the second invocation with this patch;
    clean is "make clean" or "ninja clean".
    
    Numbers are in seconds over 3 runs. This patch has no significant
    performance impact for the first build, but the second run has improved
    because the more efficient Ninja generator executes less processes.
    
    Change-Id: I7b62556393520044aaaad17dafb82ac137ae73bb
    Reviewed-on: https://code.wireshark.org/review/12028
    Petri-Dish: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    Tested-by: Peter Wu <peter@xxxxxxxxxxxxx>
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  eaac7de   Developers Guide updates for plugins with CMake
    adds  ffb5b3d   cmake: add dependency information for copy_data_files


Summary of changes:
 CMakeLists.txt |  168 +++++++++++++++++++++++++++-----------------------------
 1 file changed, 81 insertions(+), 87 deletions(-)