Skip to content

Commit

Permalink
AMReX Version (AMReX-Codes#2128)
Browse files Browse the repository at this point in the history
In git fails to obtain AMReX version in the make system, grep for the
version number in the CHANGES file.
  • Loading branch information
WeiqunZhang authored Jun 27, 2021
1 parent 6ca4306 commit 55cb400
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 21.05
# 21.06

-- Add roctx ranges to TinyProfiler (#2057)

Expand Down
3 changes: 3 additions & 0 deletions Tools/GNUMake/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@ SKIP_LINKING ?= FALSE
USE_COMPILE_PIC ?= FALSE

AMREX_GIT_VERSION := $(shell cd $(AMREX_HOME); git describe --abbrev=12 --dirty --always --tags)
ifndef AMREX_GIT_VERSION
AMREX_GIT_VERSION := $(shell grep -o -m 1 -E "[0-9]{2}\.[0-9]{2}(\.[0-9]+)?" $(AMREX_HOME)/CHANGES)
endif
DEFINES += -DAMREX_GIT_VERSION=\"$(AMREX_GIT_VERSION)\"

FORTLINK = UNDERSCORE
Expand Down

0 comments on commit 55cb400

Please sign in to comment.