CMakeLists.txt
changeset 4903 21dd1def5aaf
parent 4845 9a0f5377c529
child 4904 0eab727d4717
--- a/CMakeLists.txt	Wed Feb 02 07:40:36 2011 +0100
+++ b/CMakeLists.txt	Wed Feb 02 09:05:48 2011 +0100
@@ -9,6 +9,7 @@
 
 #detect Mercurial revision (if present)
 set(version_suffix "-dev") #UNSET THIS VARIABLE AT RELEASE TIME
+set(HGCHANGED "")
 IF(version_suffix MATCHES "-dev")
 	set(HW_DEV true)
 	IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.hg)
@@ -18,8 +19,13 @@
 				     ARGS identify -in ${CMAKE_CURRENT_SOURCE_DIR}
 				     OUTPUT_VARIABLE version_suffix
 				     )
+			STRING(REGEX REPLACE "[^+]" "" HGCHANGED ${version_suffix})
 			STRING(REGEX REPLACE "([0-9a-zA-Z]+)(.*) ([0-9]+)(.*)" "\\3:\\1" version_suffix ${version_suffix})
-			MESSAGE(STATUS "Building revision ${version_suffix}")
+			IF (HGCHANGED)
+				MESSAGE(STATUS "Building revision ${version_suffix} (SOURCE CODE MODIFIED)")
+			ELSE()
+				MESSAGE(STATUS "Building revision ${version_suffix}")
+			ENDIF()
 			set(version_suffix "-${version_suffix}")
 		ENDIF()
 	ENDIF()