FindHg: Do not use cygwin hg on Windows
The cygwin hg client is a text file with a '#!/bin/python" line. This cannot run on Windows.
This commit is contained in:
parent
54ff77dc62
commit
ed997de4f2
|
@ -66,7 +66,11 @@ if(HG_EXECUTABLE)
|
||||||
execute_process(COMMAND ${HG_EXECUTABLE} --version
|
execute_process(COMMAND ${HG_EXECUTABLE} --version
|
||||||
OUTPUT_VARIABLE hg_version
|
OUTPUT_VARIABLE hg_version
|
||||||
ERROR_QUIET
|
ERROR_QUIET
|
||||||
|
RESULT_VARIABLE hg_result
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
if(hg_result MATCHES "is not a valid Win32 application")
|
||||||
|
set_property(CACHE HG_EXECUTABLE PROPERTY VALUE "HG_EXECUTABLE-NOTFOUND")
|
||||||
|
endif()
|
||||||
if(hg_version MATCHES "^Mercurial Distributed SCM \\(version ([0-9][^)]*)\\)")
|
if(hg_version MATCHES "^Mercurial Distributed SCM \\(version ([0-9][^)]*)\\)")
|
||||||
set(HG_VERSION_STRING "${CMAKE_MATCH_1}")
|
set(HG_VERSION_STRING "${CMAKE_MATCH_1}")
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue