mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Merge pull request #157 from goracle/dev-pull
Add print of the current git hash on Grid init.
This commit is contained in:
commit
94b0d66e4c
1
.gitignore
vendored
1
.gitignore
vendored
@ -123,6 +123,7 @@ make-bin-BUCK.sh
|
|||||||
#####################
|
#####################
|
||||||
lib/qcd/spin/gamma-gen/*.h
|
lib/qcd/spin/gamma-gen/*.h
|
||||||
lib/qcd/spin/gamma-gen/*.cc
|
lib/qcd/spin/gamma-gen/*.cc
|
||||||
|
lib/version.h
|
||||||
|
|
||||||
# vs code editor files #
|
# vs code editor files #
|
||||||
########################
|
########################
|
||||||
|
@ -5,6 +5,10 @@ include $(top_srcdir)/doxygen.inc
|
|||||||
|
|
||||||
bin_SCRIPTS=grid-config
|
bin_SCRIPTS=grid-config
|
||||||
|
|
||||||
|
BUILT_SOURCES = version.h
|
||||||
|
|
||||||
|
version.h:
|
||||||
|
echo "`git log -n 1 --format=format:"#define GITHASH \\"%H:%d\\"%n" HEAD`" > $(srcdir)/lib/version.h
|
||||||
|
|
||||||
.PHONY: bench check tests doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
|
.PHONY: bench check tests doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
|
|||||||
#include <Grid/Grid.h>
|
#include <Grid/Grid.h>
|
||||||
|
|
||||||
#include <Grid/util/CompilerCompatible.h>
|
#include <Grid/util/CompilerCompatible.h>
|
||||||
|
#include <version.h>
|
||||||
|
|
||||||
|
|
||||||
#include <fenv.h>
|
#include <fenv.h>
|
||||||
@ -288,6 +289,12 @@ void Grid_init(int *argc,char ***argv)
|
|||||||
std::cout << "but WITHOUT ANY WARRANTY; without even the implied warranty of"<<std::endl;
|
std::cout << "but WITHOUT ANY WARRANTY; without even the implied warranty of"<<std::endl;
|
||||||
std::cout << "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"<<std::endl;
|
std::cout << "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"<<std::endl;
|
||||||
std::cout << "GNU General Public License for more details."<<std::endl;
|
std::cout << "GNU General Public License for more details."<<std::endl;
|
||||||
|
#ifdef GITHASH
|
||||||
|
std::cout << "Current Grid git commit hash=" << GITHASH << std::endl;
|
||||||
|
#else
|
||||||
|
std::cout << "Current Grid git commit hash is undefined. Check makefile." << std::endl;
|
||||||
|
#endif
|
||||||
|
#undef GITHASH
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user