From 196703487e33ec383dab2a0cededb2289e342083 Mon Sep 17 00:00:00 2001 From: tgrogers Date: Tue, 16 May 2017 13:37:29 -0400 Subject: Changing the version detection to be much more detailed. Now the git commit # and branch will be embedded in the built executable and print out when gpgpu-sim runs --- src/cuda-sim/Makefile | 2 +- src/cuda-sim/cuda-sim.cc | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/cuda-sim/Makefile b/src/cuda-sim/Makefile index f479294..5132bcc 100644 --- a/src/cuda-sim/Makefile +++ b/src/cuda-sim/Makefile @@ -46,7 +46,7 @@ OPT := -O3 -g3 -Wall -Wno-unused-function -Wno-sign-compare ifeq ($(DEBUG),1) OPT := -g3 -Wall -Wno-unused-function -Wno-sign-compare endif -OPT += -I$(CUDA_INSTALL_PATH)/include -I$(OUTPUT_DIR)/ -I. +OPT += -I$(CUDA_INSTALL_PATH)/include -I$(OUTPUT_DIR)/ -I. -I$(SIM_OBJ_FILES_DIR) OPT += -fPIC ifeq ($(TRACE),1) diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc index 7ec3ce9..d4ace76 100644 --- a/src/cuda-sim/cuda-sim.cc +++ b/src/cuda-sim/cuda-sim.cc @@ -1623,14 +1623,13 @@ kernel_info_t *gpgpu_opencl_ptx_sim_init_grid(class function_info *entry, } #include "../../version" +#include "detailed_version" void print_splash() { static int splash_printed=0; if ( !splash_printed ) { - unsigned build=0; - sscanf(g_gpgpusim_build_string, "$Change"": %u $", &build); - fprintf(stdout, "\n\n *** %s [build %u] ***\n\n\n", g_gpgpusim_version_string, build ); + fprintf(stdout, "\n\n *** %s [build %s] ***\n\n\n", g_gpgpusim_version_string, g_gpgpusim_build_string ); splash_printed=1; } } -- cgit v1.3