mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-22 13:08:52 +00:00
CMake build out of source
This commit is contained in:
parent
3b0a43a8d4
commit
7bca3e069f
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
function (get_version_tag_from_git GIT)
|
function (get_version_tag_from_git GIT)
|
||||||
execute_process(COMMAND "${GIT}" rev-parse --short=9 HEAD
|
execute_process(COMMAND "${GIT}" rev-parse --short=9 HEAD
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
RESULT_VARIABLE RET
|
RESULT_VARIABLE RET
|
||||||
OUTPUT_VARIABLE COMMIT
|
OUTPUT_VARIABLE COMMIT
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
@ -47,7 +48,11 @@ function (get_version_tag_from_git GIT)
|
|||||||
message(STATUS "You are currently on commit ${COMMIT}")
|
message(STATUS "You are currently on commit ${COMMIT}")
|
||||||
|
|
||||||
# Get all the tags
|
# Get all the tags
|
||||||
execute_process(COMMAND "${GIT}" rev-list --tags --max-count=1 --abbrev-commit RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
execute_process(COMMAND "${GIT}" rev-list --tags --max-count=1 --abbrev-commit
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
RESULT_VARIABLE RET
|
||||||
|
OUTPUT_VARIABLE TAGGEDCOMMIT
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
if(NOT TAGGEDCOMMIT)
|
if(NOT TAGGEDCOMMIT)
|
||||||
message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")
|
message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")
|
||||||
|
Loading…
Reference in New Issue
Block a user