Skip to content

Commit b3eb0fc

Browse files
committed
Add URL to repo & fix some spelling/grammar
1 parent 87dd0de commit b3eb0fc

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

CMakeLists.txt

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
# ---------------------------------------------------------------------------- #
22
#
33
# Copyright (c) 2020 C++ Modern Framework
4+
# https://github.com/cppmf/GitInfo.cmake
45
#
56
# ---------------------------------------------------------------------------- #
67

78
# ---------------------------------------------------------------------------- #
89
#
9-
# Following variables will be set when calling GitInfo
10+
# The following variables will be set when calling GitInfo
1011
#
1112
# GIT_DIR: path to the project .git directory
1213
# GIT_IS_DIRTY: whether or not the working tree is dirty
13-
# GIT_HEAD_BRANCH : name of the branch associated te HEAD
14+
# GIT_HEAD_BRANCH : name of the branch associated with HEAD
1415
# GIT_REVISION_HASH: current HEAD sha hash
15-
# GIT_REVISION: shorten version of GIT_REVISION_HASH
16-
# GIT_REVISION_NAME: name associated to GIT_REVISION_HASH
16+
# GIT_REVISION: short version of GIT_REVISION_HASH
17+
# GIT_REVISION_NAME: name associated with GIT_REVISION_HASH
1718
# GIT_AUTHOR_NAME : author name
1819
# GIT_AUTHOR_EMAIL : author email
1920
# GIT_AUTHOR_DATE : author date
@@ -32,7 +33,7 @@
3233
# source should point to the root project directory
3334
function(GitInfo source)
3435

35-
# Check is source is a valid path
36+
# Check if source is a valid path
3637
if(NOT EXISTS ${source})
3738
message(FATAL_ERROR "'${source}' is not a valid path")
3839
endif()
@@ -43,7 +44,6 @@ function(GitInfo source)
4344
# Check if .git folder exist
4445
if(EXISTS ${GIT_DIR})
4546

46-
#
4747
set(GIT_DIR "${GIT_DIR}" CACHE PATH "Project .git directory")
4848

4949
# Check if git is installed
@@ -70,29 +70,29 @@ function(GitInfo source)
7070
set(GIT_IS_DIRTY OFF CACHE BOOL "Indicate if current branch is dirty")
7171
endif()
7272

73-
# name of the brack associated te HEAD
73+
# name of the branch associated with HEAD
7474
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
7575
WORKING_DIRECTORY ${source}
7676
OUTPUT_VARIABLE GIT_HEAD_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE)
77-
set(GIT_HEAD_BRANCH "${GIT_HEAD_BRANCH}" CACHE INTERNAL "name of the brack associated te HEAD")
77+
set(GIT_HEAD_BRANCH "${GIT_HEAD_BRANCH}" CACHE INTERNAL "name of the branch associated with HEAD")
7878

7979
# git revision full hash
8080
execute_process(COMMAND ${GIT_EXECUTABLE} show -s "--format=%H" HEAD
8181
WORKING_DIRECTORY ${source}
8282
OUTPUT_VARIABLE GIT_REVISION_HASH OUTPUT_STRIP_TRAILING_WHITESPACE)
8383
set(GIT_REVISION_HASH "${GIT_REVISION_HASH}" CACHE INTERNAL "git revision full hash")
8484

85-
# shorten version of git revision
85+
# short version of git revision
8686
execute_process(COMMAND ${GIT_EXECUTABLE} show -s "--format=%h" HEAD
8787
WORKING_DIRECTORY ${source}
8888
OUTPUT_VARIABLE GIT_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE)
89-
set(GIT_REVISION "${GIT_REVISION}" CACHE INTERNAL "shorten version of git revision")
89+
set(GIT_REVISION "${GIT_REVISION}" CACHE INTERNAL "short version of git revision")
9090

91-
# shorten version of git revision name
91+
# short version of git revision name
9292
execute_process(COMMAND ${GIT_EXECUTABLE} show -s "--format=%s" HEAD
9393
WORKING_DIRECTORY ${source}
9494
OUTPUT_VARIABLE GIT_REVISION_NAME OUTPUT_STRIP_TRAILING_WHITESPACE)
95-
set(GIT_REVISION_NAME "${GIT_REVISION_NAME}" CACHE INTERNAL "shorten version of git revision name")
95+
set(GIT_REVISION_NAME "${GIT_REVISION_NAME}" CACHE INTERNAL "short version of git revision name")
9696

9797
# author name
9898
execute_process(COMMAND ${GIT_EXECUTABLE} show -s "--format=%an" HEAD

0 commit comments

Comments
 (0)