From: <dg...@su...> - 2009-01-14 13:48:32
|
Author: bellmich Date: Wed Jan 14 14:47:37 2009 New Revision: 156 URL: http://libwbxml.opensync.org/changeset/156 Log: added code to check for xmllint and diff These programs are needed to test the correctness of the conversions. Modified: wbxml2/trunk/CMakeLists.txt Modified: wbxml2/trunk/CMakeLists.txt ============================================================================== --- wbxml2/trunk/CMakeLists.txt Wed Jan 14 14:46:04 2009 (r155) +++ wbxml2/trunk/CMakeLists.txt Wed Jan 14 14:47:37 2009 (r156) @@ -71,6 +71,7 @@ # popt is not used # zlib is not used # nsl is part of libc6 + FIND_PACKAGE( Expat REQUIRED ) FIND_PACKAGE( Check ) @@ -83,6 +84,23 @@ INCLUDE( Testing ) ENDIF(CHECK_FOUND) +# look for the commands required for testing + +FIND_PROGRAM( XMLLINT_PROGRAM "xmllint" ) +FIND_PROGRAM( DIFF_PROGRAM "diff" ) + +IF( XMLLINT_PROGRAM ) + SET( ENABLE_XMLLINT ON ) +ELSE( XMLLINT_PROGRAM ) + SET( ENABLE_XMLLINT OFF ) +ENDIF( XMLLINT_PROGRAM ) + +IF( DIFF_PROGRAM ) + SET( ENABLE_DIFF ON ) +ELSE( DIFF_PROGRAM ) + SET( ENABLE_DIFF OFF ) +ENDIF( DIFF_PROGRAM ) + OPTION( WBXML_LIB_VERBOSE "verbose mode" OFF ) OPTION( WBXML_ENCODER_USE_STRTBL "enable string tables" ON ) OPTION( WBXML_SUPPORT_WML "enable WML support" ON ) @@ -162,6 +180,8 @@ MESSAGE( STATUS "==================================================" ) SHOW_STATUS( WBXML_LIB_VERBOSE "verbose mode\t\t\t" ) SHOW_STATUS( ENABLE_UNIT_TEST "unit tests\t\t\t" ) +SHOW_STATUS( ENABLE_XMLLINT "xmllint binary (test generated XML)" ) +SHOW_STATUS( ENABLE_DIFF "diff binary (test generated XML)" ) SHOW_STATUS( WBXML_ENCODER_USE_STRTBL "enable string tables\t\t" ) SHOW_STATUS( WBXML_SUPPORT_WML "enable WML support\t\t" ) SHOW_STATUS( WBXML_SUPPORT_WTA "enable WTA support\t\t" ) |