[Cmake-commits] [cmake-commits] king committed CTestUpdateCVS.cmake.in 1.6 1.7 CTestUpdateCommon.cmake 1.6 1.7

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Dec 18 08:13:53 EST 2009


Update of /cvsroot/CMake/CMake/Tests
In directory public:/mounts/ram/cvs-serv11269/Tests

Modified Files:
	CTestUpdateCVS.cmake.in CTestUpdateCommon.cmake 
Log Message:
Submit global tree revision in Update.xml

We teach CTest to report in a <Revision> element the revision of the
source tree that was tested.  This makes sense for all modern VCS tools
because they version the whole tree.  We simply omit this element for
CVS because it only versions files.  See issue #7541.


Index: CTestUpdateCVS.cmake.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CTestUpdateCVS.cmake.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -C 2 -d -r1.6 -r1.7
*** CTestUpdateCVS.cmake.in	22 Jun 2009 20:26:02 -0000	1.6
--- CTestUpdateCVS.cmake.in	18 Dec 2009 13:13:51 -0000	1.7
***************
*** 6,9 ****
--- 6,10 ----
  get_filename_component(TOP "${CMAKE_CURRENT_LIST_FILE}" PATH)
  set(TOP "${TOP}/@CTestUpdateCVS_DIR@")
+ set(UPDATE_NOT_GLOBAL 1)
  
  # Include code common to all update tests.

Index: CTestUpdateCommon.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CTestUpdateCommon.cmake,v
retrieving revision 1.6
retrieving revision 1.7
diff -C 2 -d -r1.6 -r1.7
*** CTestUpdateCommon.cmake	12 Aug 2009 02:01:49 -0000	1.6
--- CTestUpdateCommon.cmake	18 Dec 2009 13:13:51 -0000	1.7
***************
*** 46,49 ****
--- 46,68 ----
    endforeach(f)
  
+   if(NOT UPDATE_NOT_GLOBAL)
+     set(rev_elements "Revision|PriorRevision")
+     set(rev_regex "^\t<(${rev_elements})>[^<\n]+</(${rev_elements})>$")
+     file(STRINGS ${TOP}/${UPDATE_XML_FILE} UPDATE_XML_REVISIONS
+       REGEX "${rev_regex}"
+       LIMIT_INPUT 4096
+       )
+     foreach(r IN LISTS UPDATE_XML_REVISIONS)
+       string(REGEX REPLACE "${rev_regex}" "\\1" element "${r}")
+       set(element_${element} 1)
+     endforeach()
+     string(REPLACE "|" ";" rev_elements "${rev_elements}")
+     foreach(element ${rev_elements})
+       if(NOT element_${element})
+         list(APPEND MISSING "global <${element}> element")
+       endif()
+     endforeach()
+   endif()
+ 
    # Report the result
    if(MISSING)



More information about the Cmake-commits mailing list