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