diff options
author | Brad King <brad.king@kitware.com> | 2014-10-21 19:42:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-10-22 14:52:08 (GMT) |
commit | ed997de4f21620fb25f7380fd664bc3c1d2f8ec8 (patch) | |
tree | dddee9525c3d3db5ce75648f9043ca0c9697af83 /Modules/FindHg.cmake | |
parent | 54ff77dc621a91302abad0ab38d9bd26de8914b9 (diff) | |
download | CMake-ed997de4f21620fb25f7380fd664bc3c1d2f8ec8.zip CMake-ed997de4f21620fb25f7380fd664bc3c1d2f8ec8.tar.gz CMake-ed997de4f21620fb25f7380fd664bc3c1d2f8ec8.tar.bz2 |
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.
Diffstat (limited to 'Modules/FindHg.cmake')
-rw-r--r-- | Modules/FindHg.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/FindHg.cmake b/Modules/FindHg.cmake index c418afd..34d763e 100644 --- a/Modules/FindHg.cmake +++ b/Modules/FindHg.cmake @@ -66,7 +66,11 @@ if(HG_EXECUTABLE) execute_process(COMMAND ${HG_EXECUTABLE} --version OUTPUT_VARIABLE hg_version ERROR_QUIET + RESULT_VARIABLE hg_result 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][^)]*)\\)") set(HG_VERSION_STRING "${CMAKE_MATCH_1}") endif() |