diff options
| author | Tor Aamodt <[email protected]> | 2020-07-15 14:42:42 -0700 |
|---|---|---|
| committer | Tor Aamodt <[email protected]> | 2020-07-15 14:42:42 -0700 |
| commit | 5e8e84976b63186ce4682e3dbb1bea84542558a9 (patch) | |
| tree | 2610cd196eba67032ff664c3bae192eb0b434d79 /version_detection.mk | |
| parent | 089446c9898b050f36e854eebff5dbd33332dce8 (diff) | |
| parent | 53e63b9b5684388ad102848275efe524d68aab01 (diff) | |
Merge branch 'dev'
Diffstat (limited to 'version_detection.mk')
| -rw-r--r-- | version_detection.mk | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/version_detection.mk b/version_detection.mk index 8796d5c..ee71a62 100644 --- a/version_detection.mk +++ b/version_detection.mk @@ -30,7 +30,12 @@ ifeq ($(GPGPUSIM_ROOT),) else GPGPUSIM_VERSION=$(shell cat $(GPGPUSIM_ROOT)/version | awk '/Version/ {print $$8}' ) -GPGPUSIM_BUILD=$(shell cat $(GPGPUSIM_ROOT)/version | awk '/Change/ {print $$6}' ) + +#Detect Git branch and commit # +GIT_COMMIT := $(shell git log -n 1 | head -1 | sed -re 's/commit (.*)/\1/') +GIT_FILES_CHANGED_A:=$(shell git diff --numstat | wc | sed -re 's/^\s+([0-9]+).*/\1./') +GIT_FILES_CHANGED:= $(GIT_FILES_CHANGED_A)$(shell git diff --numstat --cached | wc | sed -re 's/^\s+([0-9]+).*/\1/') +GPGPUSIM_BUILD := gpgpu-sim_git-commit-$(GIT_COMMIT)_modified_$(GIT_FILES_CHANGED) endif # Detect CUDA Runtime Version @@ -42,4 +47,3 @@ CC_VERSION := $(shell gcc --version | head -1 | awk '{for(i=1;i<=NF;i++){ if(mat # Detect Support for C++11 (C++0x) from GCC Version GNUC_CPP0X := $(shell gcc --version | perl -ne 'if (/gcc\s+\(.*\)\s+([0-9.]+)/){ if($$1 >= 4.3) {$$n=1} else {$$n=0;} } END { print $$n; }') - |
