Commit b9eff821 authored by ua741532's avatar ua741532

small changes which allows to work with old git (got rid of "git -C")

parent 038fd4ba
......@@ -8,13 +8,13 @@ string(TIMESTAMP compile_time)
set(git_hash unkown)
if (EXISTS ${CMAKE_SOURCE_DIR}/.git)
execute_process(COMMAND git -C ${CMAKE_SOURCE_DIR} describe --tags OUTPUT_VARIABLE git_describe)
execute_process(COMMAND git describe --tags WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE git_describe)
if (${git_describe})
message("GIT DESCRIBE:${git_describe}")
else()
set(git_describe unkown)
endif()
execute_process(COMMAND git -C ${CMAKE_SOURCE_DIR} rev-parse HEAD OUTPUT_VARIABLE git_hash)
execute_process(COMMAND git rev-parse HEAD WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE git_hash)
elseif (EXISTS ${CMAKE_SOURCE_DIR}/version)
file(READ ${CMAKE_SOURCE_DIR}/version git_describe)
else()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment