Skip to content

Commit

Permalink
Merge branch 'fix_adtf_configure_file_error' into 'develop'
Browse files Browse the repository at this point in the history
[FIX] configure_file error in ADTF

See merge request aduulm/source/git_hooks!1
  • Loading branch information
Andreas Danzer committed Mar 28, 2019
2 parents 672ff12 + a803b64 commit bad6eba
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,33 @@ function(create_git_hook)
else()
configure_file(
"${GCF_DIR}/pre-commit.template.sh"
"${GCF_GIT_DIR}/hooks/pre-commit"
"${CMAKE_CURRENT_BINARY_DIR}/pre-commit"
@ONLY)
file(COPY
"${CMAKE_CURRENT_BINARY_DIR}/pre-commit"
DESTINATION
"${GCF_GIT_DIR}/hooks"
)

get_filename_component(GCF_PROJECT_NAME "${CMAKE_BINARY_DIR}" NAME)
configure_file(
"${GCF_DIR}/project.template.yaml"
"${GCF_GIT_DIR}/hooks/.${GCF_PROJECT_NAME}.config.yaml"
"${CMAKE_CURRENT_BINARY_DIR}/.${GCF_PROJECT_NAME}.config.yaml"
@ONLY)
file(COPY
"${CMAKE_CURRENT_BINARY_DIR}/.${GCF_PROJECT_NAME}.config.yaml"
DESTINATION
"${GCF_GIT_DIR}/hooks/"
)

configure_file(
"${GCF_DIR}/run_hooks.template.sh"
"${GCF_GIT_ROOT}/run_hooks"
"${CMAKE_CURRENT_BINARY_DIR}/run_hooks"
@ONLY)
file(COPY
"${CMAKE_CURRENT_BINARY_DIR}/run_hooks"
DESTINATION
"${GCF_GIT_ROOT}/"
)
endif()
endfunction()

0 comments on commit bad6eba

Please sign in to comment.