Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store the current Git hash in a CMake var
Browse files Browse the repository at this point in the history
poco0317 committed Nov 25, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 14acf71 commit a9794ff
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -16,6 +16,14 @@ project(Etterna
HOMEPAGE_URL https://github.com/etternagame/etterna/
LANGUAGES C CXX ASM)

# Git Hash Info
execute_process(COMMAND git describe --tags
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
OUTPUT_VARIABLE PRODUCT_GIT_HASH
RESULT_VARIABLE ret
OUTPUT_STRIP_TRAILING_WHITESPACE
)

## CMake and Compiler Setup
set(CMAKE_CXX_STANDARD 14) # Minimum C++ Version
set(CMAKE_CXX_EXTENSIONS OFF) # True if compiler extensions are necessary. (Changes -std flag)

0 comments on commit a9794ff

Please sign in to comment.