Skip to content
  • jcfr's avatar
    ENH: GenerateCLP - Add option GENERATECLP_USE_MD5 · df652352
    jcfr authored
     If GENERATE_USE_MD5 is defined, generated output will be appended into a stringstream.
    
     Following the generation, the MD5 of both the output buffer and
     the existing file (if any) will be computed.
    
     Three cases can be numbered:
       1) Output file [OutputCxx] do NOT exists               => Write output buffer to file.
       2) Output file [OutputCxx] exists and MD5 match        => Discard Output buffer.
       3) Output file [OutputCxx] exists and MD5 do NOT match => Write output buffer to file.
    
     Computing the MD5 allows to update the file only if required. Since the
     modified time associated the file will be updated only if it really changed,
     extra compilation cycle could be avoided.
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@16365 3bd1e089-480b-0410-8dfb-8563597acbee
    df652352