Replace calls to "hg" by calls to "git"
This commit is contained in:
		
							parent
							
								
									8fbe0e4699
								
							
						
					
					
						commit
						c488b8b32f
					
				| @ -42,27 +42,25 @@ string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen_minor_ | ||||
| set(EIGEN_MINOR_VERSION "${CMAKE_MATCH_1}") | ||||
| set(EIGEN_VERSION_NUMBER ${EIGEN_WORLD_VERSION}.${EIGEN_MAJOR_VERSION}.${EIGEN_MINOR_VERSION}) | ||||
| 
 | ||||
| # if we are not in a mercurial clone | ||||
| if(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.hg) | ||||
|   # if the mercurial program is absent or this will leave the EIGEN_HG_CHANGESET string empty, | ||||
| # if we are not in a git clone | ||||
| if(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git) | ||||
|   # if the git program is absent or this will leave the EIGEN_GIT_REVNUM string empty, | ||||
|   # but won't stop CMake. | ||||
|   execute_process(COMMAND hg tip -R ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE EIGEN_HGTIP_OUTPUT) | ||||
|   execute_process(COMMAND hg branch -R ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE EIGEN_BRANCH_OUTPUT) | ||||
|   execute_process(COMMAND git ls-remote --refs -q ${CMAKE_SOURCE_DIR} HEAD OUTPUT_VARIABLE EIGEN_GIT_OUTPUT) | ||||
| endif() | ||||
| 
 | ||||
| # if this is the default (aka development) branch, extract the mercurial changeset number from the hg tip output... | ||||
| if(EIGEN_BRANCH_OUTPUT MATCHES "default") | ||||
| string(REGEX MATCH "^changeset: *[0-9]*:([0-9;a-f]+).*" EIGEN_HG_CHANGESET_MATCH "${EIGEN_HGTIP_OUTPUT}") | ||||
| set(EIGEN_HG_CHANGESET "${CMAKE_MATCH_1}") | ||||
| # extract the git rev number from the git output... | ||||
| if(EIGEN_GIT_OUTPUT) | ||||
| string(REGEX MATCH "^([0-9;a-f]+).*" EIGEN_GIT_CHANGESET_MATCH "${EIGEN_GIT_OUTPUT}") | ||||
| set(EIGEN_GIT_REVNUM "${CMAKE_MATCH_1}") | ||||
| endif() | ||||
| #...and show it next to the version number | ||||
| if(EIGEN_HG_CHANGESET) | ||||
|   set(EIGEN_VERSION "${EIGEN_VERSION_NUMBER} (mercurial changeset ${EIGEN_HG_CHANGESET})") | ||||
| if(EIGEN_GIT_REVNUM) | ||||
|   set(EIGEN_VERSION "${EIGEN_VERSION_NUMBER} (git rev ${EIGEN_GIT_REVNUM})") | ||||
| else() | ||||
|   set(EIGEN_VERSION "${EIGEN_VERSION_NUMBER}") | ||||
| endif() | ||||
| 
 | ||||
| 
 | ||||
| include(CheckCXXCompilerFlag) | ||||
| include(GNUInstallDirs) | ||||
| 
 | ||||
|  | ||||
| @ -27,7 +27,7 @@ echo '<ul>'\ | ||||
|   '<li>' `cat /proc/cpuinfo | grep "model name" | head -n 1`\ | ||||
|   '  (' `uname -m` ')</li>'\ | ||||
|   '<li> compiler: ' `cat compiler_version.txt` '</li>'\ | ||||
|   '<li> eigen3: ' `hg identify -i $EIGENDIR` '</li>'\ | ||||
|   '<li> eigen3: ' `git ls-remote --refs  -q $EIGENDIR HEAD | cut  -f 1` '</li>'\ | ||||
|   '</ul>' \ | ||||
|   '</p>'  >> $webpagefilename | ||||
| 
 | ||||
|  | ||||
| @ -61,10 +61,10 @@ fi | ||||
| 
 | ||||
| 
 | ||||
| if [ ! -d "eigen_src" ]; then | ||||
|   hg clone https://bitbucket.org/eigen/eigen eigen_src | ||||
|   git clone https://gitlab.com/libeigen/eigen.git eigen_src | ||||
| else | ||||
|   cd eigen_src | ||||
|   hg pull -u | ||||
|   git pull | ||||
|   cd .. | ||||
| fi | ||||
| 
 | ||||
| @ -151,8 +151,8 @@ do | ||||
|     rev2=`echo $rev | cut -f 2 -d':'` | ||||
|     echo "Testing rev $rev, $rev2" | ||||
|     cd eigen_src | ||||
|     hg up -C $rev2 > /dev/null | ||||
|     actual_rev=`hg identify | cut -f1 -d' '` | ||||
|     git checkout $rev2 > /dev/null | ||||
|     actual_rev=`git rev-parse --short HEAD` | ||||
|     cd .. | ||||
|      | ||||
|     test_current $actual_rev float                  $WORKING_DIR_PREFIX"s"$bench | ||||
|  | ||||
| @ -12,8 +12,8 @@ elseif(${CTEST_SCRIPT_ARG} MATCHES Continuous) | ||||
|   set(MODEL Continuous) | ||||
| endif() | ||||
| 
 | ||||
| find_program(CTEST_HG_COMMAND NAMES hg) | ||||
| set(CTEST_UPDATE_COMMAND "${CTEST_HG_COMMAND}") | ||||
| find_program(CTEST_GIT_COMMAND NAMES git) | ||||
| set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}") | ||||
| 
 | ||||
| ctest_start(${MODEL} ${CTEST_SOURCE_DIRECTORY} ${CTEST_BINARY_DIRECTORY}) | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Gael Guennebaud
						Gael Guennebaud