VTK  9.1.0
Functions
vtkHashSource.cmake File Reference

This module contains the vtk_hash_source function which may be used to generate a hash from a file and place that in a generated header. More...

Go to the source code of this file.

Functions

function vtk_hash_source ()
 Generate a header containing the hash of a file.
 

Detailed Description

This module contains the vtk_hash_source function which may be used to generate a hash from a file and place that in a generated header.

Definition in file vtkHashSource.cmake.

Function Documentation

◆ vtk_hash_source()

function vtk_hash_source ( )

Generate a header containing the hash of a file.

Add a rule to turn a file into a MD5 hash and place that in a C string.

INPUT <input>
[NAME <name>]
[ALGORITHM <algorithm>]
[HEADER_OUTPUT <header>])
function vtk_hash_source()
Generate a header containing the hash of a file.

The only required variable is INPUT.

  • INPUT: (Required) The path to the file to process. If a relative path is given, it will be interpreted as being relative to CMAKE_CURRENT_SOURCE_DIR.
  • NAME: This is the base name of the header file that will be generated as well as the variable name for the C string. It defaults to basename of the input suffixed with Hash.
  • ALGORITHM: This is the hashing algorithm to use. Supported values are MD5, SHA1, SHA224, SHA256, SHA384, and SHA512. If not specified, MD5 is assumed.
  • HEADER_OUTPUT: the variable to store the generated header path.

Definition at line 35 of file vtkHashSource.cmake.