diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindBacktrace.cmake | 8 | ||||
-rw-r--r-- | cmake/GenVersion.cmake | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/cmake/FindBacktrace.cmake b/cmake/FindBacktrace.cmake index 89bbad07c..8137125ab 100644 --- a/cmake/FindBacktrace.cmake +++ b/cmake/FindBacktrace.cmake @@ -83,6 +83,14 @@ else() set(_Backtrace_STD_ARGS Backtrace_LIBRARY ${_Backtrace_STD_ARGS}) endif() +message(STATUS "Backtrace_LIBRARY: ${Backtrace_LIBRARY}") +if(Backtrace_LIBRARY STREQUAL "NOTFOUND") + set(Backtrace_LIBRARY "") +endif() +if(Backtrace_LIBRARY STREQUAL "Backtrace_LIBRARY-NOTFOUND") + set(Backtrace_LIBRARY "") +endif() + set(Backtrace_LIBRARIES ${Backtrace_LIBRARY}) set(Backtrace_HEADER "${_Backtrace_HEADER_TRY}" CACHE STRING "Header providing backtrace(3) facility") diff --git a/cmake/GenVersion.cmake b/cmake/GenVersion.cmake index 1ea5b209c..b2ccfbc34 100644 --- a/cmake/GenVersion.cmake +++ b/cmake/GenVersion.cmake @@ -29,7 +29,7 @@ # Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers # Check what commit we're on -execute_process(COMMAND "${GIT}" rev-parse --short HEAD RESULT_VARIABLE RET OUTPUT_VARIABLE COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process(COMMAND "${GIT}" rev-parse --short=9 HEAD RESULT_VARIABLE RET OUTPUT_VARIABLE COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE) if(RET) # Something went wrong, set the version tag to -unknown @@ -38,6 +38,7 @@ if(RET) set(VERSIONTAG "unknown") configure_file("src/version.cpp.in" "${TO}") else() + string(SUBSTRING ${COMMIT} 0 9 COMMIT) message(STATUS "You are currently on commit ${COMMIT}") # Get all the tags |