mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-03 21:44:33 +00:00 
			
		
		
		
	Merge pull request #158 from goracle/dev-pull
Make compilation faster by moving print of git hash.
This commit is contained in:
		@@ -289,12 +289,7 @@ void Grid_init(int *argc,char ***argv)
 | 
			
		||||
    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 << "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
 | 
			
		||||
    printHash();
 | 
			
		||||
    std::cout << std::endl;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -61,6 +61,7 @@ namespace Grid {
 | 
			
		||||
		       std::vector<int> &simd,
 | 
			
		||||
		       std::vector<int> &mpi);
 | 
			
		||||
 | 
			
		||||
  void printHash(void);
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								lib/util/version.cc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								lib/util/version.cc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
#include <iostream>
 | 
			
		||||
#include <version.h>
 | 
			
		||||
namespace Grid {
 | 
			
		||||
  void printHash(){
 | 
			
		||||
#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
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user