diff --git a/CMake/FindMercurial.cmake b/CMake/FindMercurial.cmake
index befc72385f1119c2be8fc360d2c61f65de2826c9..3c06e485a2458168ac0489273ece4643dc5ecaaa 100644
--- a/CMake/FindMercurial.cmake
+++ b/CMake/FindMercurial.cmake
@@ -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)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cf64b84dd9d465534a815a590d5351a22e8e4985..f9621ed40301aae018afcbbc70a51cb49c3a6437 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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.