Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
  • Loading branch information
Alan-Jowett committed Jan 5, 2023
1 parent 49617aa commit a8f6c83
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,10 @@
project("ubpf")
cmake_minimum_required(VERSION 3.16)

# Only run if not included as a subproject
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(UBPF_IS_TOP_LEVEL TRUE)
else()
set(UBPF_IS_TOP_LEVEL FALSE)
endif()

if (UBPF_INSTALL_GIT_HOOKS AND UBPF_IS_TOP_LEVEL)
if (EXISTS "${PROJECT_SOURCE_DIR}/.git")
# Install Git pre-commit hook
file(COPY scripts/pre-commit scripts/commit-msg
DESTINATION "${PROJECT_SOURCE_DIR}/.git/hooks")
endif()
if (UBPF_INSTALL_GIT_HOOKS AND EXISTS "${PROJECT_SOURCE_DIR}/.git/hooks")
# Install Git pre-commit hook
file(COPY scripts/pre-commit scripts/commit-msg
DESTINATION "${PROJECT_SOURCE_DIR}/.git/hooks")
endif()

include("cmake/platform.cmake")
Expand Down

0 comments on commit a8f6c83

Please sign in to comment.