Commit 3656ce7e authored by Emmanuel Christophe's avatar Emmanuel Christophe

ENH: cmake warns of local file modifications

parent 1666add3
......@@ -36,6 +36,12 @@ IF(Mercurial_HG_EXECUTABLE)
RESULT_VARIABLE Mercurial_hg_identify_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
EXECUTE_PROCESS(COMMAND ${Mercurial_HG_EXECUTABLE} status -m ${dir}
OUTPUT_VARIABLE ${prefix}_WC_STATUS
ERROR_VARIABLE Mercurial_hg_status_error
RESULT_VARIABLE Mercurial_hg_status_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
IF(NOT ${Mercurial_hg_identify_result} EQUAL 0)
MESSAGE(SEND_ERROR "Command \"${Mercurial_HG_EXECUTABLE} identify ${dir}\" failed with output:\n${Mercurial_hg_identify_error}")
ELSE(NOT ${Mercurial_hg_identify_result} EQUAL 0)
......
......@@ -76,6 +76,12 @@ IF(Mercurial_FOUND)
MESSAGE("Mercurial version is ${Mercurial_VERSION_HG}")
MESSAGE("Repository revision is ${OTB_WC_REVISION}")
SET(OTB_VERSION_STRING "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.${OTB_VERSION_PATCH}.${OTB_WC_REVISION}")
IF(OTB_WC_STATUS)
MESSAGE("Local file modifications:")
MESSAGE(${OTB_WC_STATUS})
ELSE(OTB_WC_STATUS)
MESSAGE("No files modified locally")
ENDIF(OTB_WC_STATUS)
ELSE(Mercurial_FOUND)
# Version string should not include patch level. The major.minor is
# enough to distinguish available features of the toolkit.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment