From ff1bed313b5132def2a69b94f93f90e4b3f14cd2 Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Mon, 17 Jun 2024 14:40:36 +0800 Subject: [PATCH] feat move find_package(Git REQUIRED) --- CMakeLists.txt | 2 ++ cmake/BuildInfo.cmake | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f45181..50901ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,6 +67,8 @@ include(cmake/BuildInfo.cmake) check_symbol_exists("getifaddrs" "ifaddrs.h" TILE_HAVE_GETIFADDRS) check_symbol_exists("freeifaddrs" "ifaddrs.h" TILE_HAVE_FREEIFADDRS) +find_package(Git REQUIRED) + get_git_commit_hash(GIT_COMMIT_HASH) get_git_commit_date(GIT_COMMIT_DATE) get_git_commit_subject(GIT_COMMIT_SUBJECT) diff --git a/cmake/BuildInfo.cmake b/cmake/BuildInfo.cmake index e2c19a6..33c60ac 100644 --- a/cmake/BuildInfo.cmake +++ b/cmake/BuildInfo.cmake @@ -1,5 +1,3 @@ -find_package(Git REQUIRED) - macro(get_git_commit_hash output) # full commit hash execute_process(