-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Distinguish builds with commit rather than build date
- Loading branch information
1 parent
9ff71b6
commit 8ecccc1
Showing
7 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
set(VERSION_GITHASH "(none)") | ||
|
||
execute_process(COMMAND git rev-parse --short HEAD | ||
WORKING_DIRECTORY "${GENERATE_VERSION_SOURCE_DIR}" | ||
OUTPUT_VARIABLE VERSION_GITHASH OUTPUT_STRIP_TRAILING_WHITESPACE | ||
ERROR_QUIET) | ||
if(VERSION_GITHASH) | ||
set(VERSION_GITHASH "${VERSION_GITHASH}") | ||
endif() | ||
|
||
configure_file( | ||
${GENERATE_VERSION_SOURCE_DIR}/src/src/version_info_git.hh.in | ||
${GENERATE_VERSION_BINARY_DIR}/version_info_git.hh) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
|
||
int principia_version_code(); | ||
const char* principia_version_string(); | ||
const char* principia_version_hash(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#pragma once | ||
|
||
// Filled in by CMake | ||
|
||
#define PRINCIPIA_VERSION_HASH "@VERSION_GITHASH@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters