awesome-widgets/sources/checkgit.cmake
arcan1s 17a8a1734b * create cppcheck and clangformat targets
* apply code style (#67)
* send values by reference
* fix warnings on plugin destruction by disconnecting dataengines first
* fix invalid hddtemp group definition
2015-10-18 00:05:42 +03:00

12 lines
258 B
CMake

exec_program(
"git"
${CMAKE_CURRENT_SOURCE_DIR}
ARGS "log" "-1" "--format=\"%h\""
OUTPUT_VARIABLE COMMIT_SHA
RETURN_VALUE GIT_RETURN
)
if (${GIT_RETURN} EQUAL "0")
set(PROJECT_COMMIT_SHA "${COMMIT_SHA}")
endif ()