~ubuntu-branches/debian/sid/simpleitk/sid

« back to all changes in this revision

Viewing changes to CMake/sitkCheckSourceTree.cmake

  • Committer: Package Import Robot
  • Author(s): Ghislain Antony Vaillant
  • Date: 2017-11-02 08:49:18 UTC
  • Revision ID: package-import@ubuntu.com-20171102084918-7hs09ih668xq87ej
Tags: upstream-1.0.1
ImportĀ upstreamĀ versionĀ 1.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Install a pre-commit hook to bootstrap commit hooks.
 
2
if(EXISTS "${SimpleITK_SOURCE_DIR}/.git/config" AND
 
3
    NOT EXISTS "${SimpleITK_SOURCE_DIR}/.git/hooks/pre-commit")
 
4
  # Silently ignore the error if the hooks directory is read-only.
 
5
  execute_process(
 
6
    COMMAND ${CMAKE_COMMAND} -E copy ${ITK_SOURCE_DIR}/CMake/pre-commit
 
7
                                     ${ITK_SOURCE_DIR}/.git/hooks/pre-commit
 
8
    OUTPUT_VARIABLE _output
 
9
    ERROR_VARIABLE  _output
 
10
    RESULT_VARIABLE _result
 
11
    )
 
12
  if(_result AND NOT "${_output}" MATCHES "Error copying file")
 
13
    message("${_output}")
 
14
  endif()
 
15
endif()