[Cmake-commits] CMake branch, next, updated. v2.8.1-1478-g97c0dd3

Brad King brad.king at kitware.com
Wed Jun 23 07:44:18 EDT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  97c0dd3d52be1fb9b838406ffb3e05fa23d7f2c6 (commit)
       via  1819d9d61794a0783c30c1b8144391e8dba2392a (commit)
      from  04c04e59692b75cadb9ccd9ab7b43c151eaf200e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=97c0dd3d52be1fb9b838406ffb3e05fa23d7f2c6
commit 97c0dd3d52be1fb9b838406ffb3e05fa23d7f2c6
Merge: 04c04e5 1819d9d
Author: Brad King <brad.king at kitware.com>
Date:   Wed Jun 23 07:41:25 2010 -0400

    Merge branch 'test-HTML-xmllint-nonet' into next


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1819d9d61794a0783c30c1b8144391e8dba2392a
commit 1819d9d61794a0783c30c1b8144391e8dba2392a
Author: Brad King <brad.king at kitware.com>
Date:   Wed Jun 23 07:38:33 2010 -0400

    Run CMake.HTML test with older xmllint (#10857)
    
    Old versions of xmllint do not have --nonet or --path options.
    Fall back to the network-access form in this case.

diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt
index 4aa8719..4c9202c 100644
--- a/Utilities/CMakeLists.txt
+++ b/Utilities/CMakeLists.txt
@@ -138,16 +138,24 @@ if(BUILD_TESTING)
   endif()
   mark_as_advanced(LIBXML2_XMLLINT_EXECUTABLE)
   if(LIBXML2_XMLLINT_EXECUTABLE)
-    # We provide the XHTML DTD and its dependencies in the 'xml'
-    # directory so that xmllint can run without network access.
-    # However, it's --path option accepts a space-separated list of
-    # paths so it cannot handle spaces in the path to the source tree.
-    # Therefore we run the tool with the current work directory set to
-    # the 'xml' directory and use '.' as the path.
-    add_test(CMake.HTML
-      ${CMAKE_CMAKE_COMMAND} -E chdir ${CMAKE_CURRENT_SOURCE_DIR}/xml
-      ${LIBXML2_XMLLINT_EXECUTABLE} --valid --noout --nonet --path .
-      ${HTML_FILES}
-      )
+    execute_process(COMMAND ${LIBXML2_XMLLINT_EXECUTABLE} --help
+      OUTPUT_VARIABLE _help ERROR_VARIABLE _err)
+    if("${_help}" MATCHES "--path" AND "${_help}" MATCHES "--nonet")
+      # We provide the XHTML DTD and its dependencies in the 'xml'
+      # directory so that xmllint can run without network access.
+      # However, it's --path option accepts a space-separated list of
+      # paths so it cannot handle spaces in the path to the source tree.
+      # Therefore we run the tool with the current work directory set to
+      # the 'xml' directory and use '.' as the path.
+      add_test(CMake.HTML
+        ${CMAKE_CMAKE_COMMAND} -E chdir ${CMAKE_CURRENT_SOURCE_DIR}/xml
+        ${LIBXML2_XMLLINT_EXECUTABLE} --valid --noout --nonet --path .
+        ${HTML_FILES}
+        )
+    else()
+      add_test(CMake.HTML
+        ${LIBXML2_XMLLINT_EXECUTABLE} --valid --noout ${HTML_FILES}
+        )
+    endif()
   endif()
 endif()

-----------------------------------------------------------------------

Summary of changes:
 Utilities/CMakeLists.txt |   30 +++++++++++++++++++-----------
 1 files changed, 19 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list