From 85183a702ab342de03d7a8d7b73e1fb0f7e346f2 Mon Sep 17 00:00:00 2001 From: Lectem Date: Sun, 31 May 2015 13:24:23 +0200 Subject: force no-tab/trailing spaces with git hook Remove unneeded stuff from pre-commit script The check against an empty commit was not needed (it is only a security for the 1st commit after git init). It could also possibly pose problems because of the redirection to /dev/null on some windows systems. newline at EOF & fixed indent --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index fc742317..d958dfc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,13 @@ cmake_minimum_required(VERSION 2.8.11) project(citra) +if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit) + message(STATUS "Copying pre-commit hook") + file(COPY hooks/pre-commit + DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks + FILE_PERMISSIONS WORLD_EXECUTE ) +endif() + if (NOT MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-attributes -pthread") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread") -- cgit v1.2.3