execute_process(
        COMMAND git log -1 --format=%h
        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
        OUTPUT_VARIABLE COMMIT_SHA
        RESULT_VARIABLE GIT_RETURN
        OUTPUT_STRIP_TRAILING_WHITESPACE
)

if (${GIT_RETURN} EQUAL "0")
    set(PROJECT_COMMIT_SHA "${COMMIT_SHA}")
endif ()
