mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Change back to using -DGIT_SHA1.
This commit is contained in:
parent
71c327eb59
commit
3dc9822b6d
3 changed files with 1 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -4,7 +4,6 @@
|
|||
*.mod
|
||||
*.log
|
||||
*.out
|
||||
git_sha1.h
|
||||
|
||||
# Compiler python objects
|
||||
*.pyc
|
||||
|
|
|
|||
|
|
@ -162,10 +162,7 @@ execute_process(COMMAND git rev-parse -q HEAD
|
|||
OUTPUT_VARIABLE GIT_SHA1
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(GIT_SHA1_SUCCESS EQUAL 0)
|
||||
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/git_sha1.h
|
||||
"#define GIT_SHA1 \"${GIT_SHA1}\"")
|
||||
else()
|
||||
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/git_sha1.h "")
|
||||
add_definitions(-DGIT_SHA1="${GIT_SHA1}")
|
||||
endif()
|
||||
|
||||
#===============================================================================
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ contains
|
|||
' License: http://mit-crpg.github.io/openmc/license.html'
|
||||
write(UNIT=OUTPUT_UNIT, FMT='(6X,"Version:",8X,I1,".",I1,".",I1)') &
|
||||
VERSION_MAJOR, VERSION_MINOR, VERSION_RELEASE
|
||||
#include "git_sha1.h"
|
||||
#ifdef GIT_SHA1
|
||||
write(UNIT=OUTPUT_UNIT, FMT='(6X,"Git SHA1:",7X,A)') GIT_SHA1
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue