Skip to content

Commit e6841dc

Browse files
ni4antonsviridenko
authored andcommitted
Update version.cmake to not require Git.
1 parent c08167c commit e6841dc

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

cmake/version.cmake

+1-10
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ macro(_git var)
3737
)
3838
endmacro()
3939

40-
# call git, store output in var (can not fail)
41-
macro(git var)
42-
_git(${var} ${ARGN})
43-
if (NOT _git_ec EQUAL 0)
44-
string(REPLACE ";" " " args "${ARGN}")
45-
message(FATAL_ERROR "Failed to execute: git ${args}")
46-
endif()
47-
endmacro()
48-
4940
function(extract_version_info version var_prefix)
5041
# extract the main components
5142
# v1.9.0-3-g5b92266+1546836556
@@ -91,7 +82,7 @@ function(determine_version source_dir var_prefix)
9182
message(STATUS "Found no version.txt.")
9283
endif()
9384
# for GIT_EXECUTABLE
94-
find_package(Git REQUIRED)
85+
find_package(Git)
9586
# get a description of the version, something like:
9687
# v1.9.1-0-g38ffe82 (a tagged release)
9788
# v1.9.1-0-g38ffe82-dirty (a tagged release with local modifications)

0 commit comments

Comments
 (0)