diff options
| author | Mahmoud <[email protected]> | 2017-07-12 15:26:10 -0400 |
|---|---|---|
| committer | Mahmoud <[email protected]> | 2017-07-12 15:26:10 -0400 |
| commit | 40af9c870920903fe7df44d0b85f58ccffb7df71 (patch) | |
| tree | 1391bd6f51c6d587f6680bf30e162f31ba7cff82 /version_detection.mk | |
| parent | 9ca55c4871597e12a161bedb607308c28ed434e2 (diff) | |
| parent | be451de4abf4fac2ea4b8bd2a79c6037ac635990 (diff) | |
Merge branch 'dev' of https://github.rcac.purdue.edu/abdallm/gpgpu-sim_distribution into dev
Diffstat (limited to 'version_detection.mk')
| -rw-r--r-- | version_detection.mk | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/version_detection.mk b/version_detection.mk index 8796d5c..00a86c0 100644 --- a/version_detection.mk +++ b/version_detection.mk @@ -30,7 +30,11 @@ 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 := $(shell git diff --numstat --cached && git diff --numstat | 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 +46,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; }') - |
